Re: [PATCH v11 1/2] tpm: convert tpmdev options processing to new visitor format

2025-01-06 Thread Philippe Mathieu-Daudé
On 12/12/24 18:05, James Bottomley wrote: Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley Tested-by: Stefan Berger Reviewed-by: Stefan Berger --- v

Re: [RFC PATCH 0/4] cpu: Drop CPUState::nr_cores

2025-01-06 Thread Xiaoyao Li
On 12/31/2024 12:11 AM, Igor Mammedov wrote: On Thu, 5 Dec 2024 09:57:12 -0500 Xiaoyao Li wrote: The series is motivated by auditing the usage of CPUState::nr_cores and CPUState::nr_threads, which is motivated by [1]. The initial goal is to initialize nr_threads and nr_cores earlier for x86,

KVM/QEMU community call 07/01/2025

2025-01-06 Thread Alex Bennée
Hi, The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 07/01/2025 14:00 UTC Are there any agenda items for the sync-up? -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] hw/ufs: Adjust value to match CPU's endian format

2025-01-06 Thread Philippe Mathieu-Daudé
On 7/1/25 08:02, Keoseong Park wrote: In ufs_write_attr_value(), the value parameter is handled in the CPU's endian format but provided in big-endian format by the caller. Thus, it is converted accordingly. Fixes: 7c85332a2b3 ("hw/ufs: minor bug fixes related to ufs-test") Signed-off-by: Keo

[PATCH] hw/ufs: Fix legacy single doorbell support bit

2025-01-06 Thread Jeuk Kim
QEMU UFS has supported both legacy single doorbell and MCQ, but the LSDBS value was incorrectly set. This change corrects the LSDBS value to 0. Signed-off-by: Jeuk Kim --- hw/ufs/ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c index 8d26d1379

Re: [PATCH v2 01/10] i386/cpu: Extract a common fucntion to setup value of MSR_CORE_THREAD_COUNT

2025-01-06 Thread Philippe Mathieu-Daudé
On 7/1/25 05:34, Xiaoyao Li wrote: On 1/7/2025 12:31 PM, Xiaoyao Li wrote: On 1/3/2025 4:52 PM, Philippe Mathieu-Daudé wrote: On 28/12/24 18:37, Philippe Mathieu-Daudé wrote: On 19/12/24 12:01, Xiaoyao Li wrote: There are duplicated code to setup the value of MSR_CORE_THREAD_COUNT. Extract a

Re: [PATCH 07/73] tcg: Add TCGType argument to tcg_op_supported

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 +- tcg/tcg.c | 10 ++ 2 files changed, 7 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 14/73] target/i386: Use tcg_op_supported

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Do not reference TCG_TARGET_HAS_* directly. Signed-off-by: Richard Henderson --- target/i386/tcg/emit.c.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 09/73] target/arm: Use tcg_op_supported

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Do not reference TCG_TARGET_HAS_* directly. Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 10 ++ target/arm/tcg/translate-sve.c | 2 +- target/arm/tcg/translate.c | 2 +- 3 files changed, 8 insertions(+), 6 del

Re: [PATCH 10/73] target/tricore: Use tcg_op_supported

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Do not reference TCG_TARGET_HAS_* directly. Signed-off-by: Richard Henderson --- target/tricore/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 04/73] tcg: Add TCGType argument to tcg_gen_op*

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: This covers the balance of opcode generation. At this point, TCGOp.type is initialized. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 13 ++--- tcg/tcg-op-ldst.c | 26 +- tcg/tcg-op.c | 119 --

Re: [PATCH v2 05/10] i386/topology: Introduce helpers for various topology info of different level

2025-01-06 Thread Xiaoyao Li
On 12/27/2024 3:51 PM, Zhao Liu wrote: +static inline unsigned x86_module_per_pkg(X86CPUTopoInfo *topo_info) +{ +return topo_info->modules_per_die * topo_info->dies_per_pkg; +} + +static inline unsigned x86_cores_per_pkg(X86CPUTopoInfo *topo_info) +{ +return topo_info->cores_per_module *

Re: [PATCH 03/73] tcg: Add TCGType argument to tcg_emit_op, tcg_op_insert_*

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: In some places we have a ready type to give. In others, like tcg-op.c, simply pass 0 for now. Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 8 +--- include/tcg/tcg.h| 6 +++--- tcg/optimize.c | 20 +++-

Re: [PATCH v2 2/2] hw/sd/sdhci: Fix data transfer did not complete if data size is bigger than SDMA Buffer Boundary

2025-01-06 Thread Bernhard Beschow
Am 13. Dezember 2024 03:12:05 UTC schrieb Jamin Lin via : >According to the design of sdhci_sdma_transfer_multi_blocks, if the >"s->blkcnt * 512" was bigger than the SDMA Buffer boundary, it break the >while loop of data transfer and set SDHC_NISEN_DMA in the normal interrupt >status to notify t

Re: [PATCH v2 07/10] i386/cpu: Hoist check of CPUID_EXT3_TOPOEXT against threads_per_core

2025-01-06 Thread Xiaoyao Li
On 12/27/2024 4:07 PM, Zhao Liu wrote: On Thu, Dec 19, 2024 at 06:01:22AM -0500, Xiaoyao Li wrote: Date: Thu, 19 Dec 2024 06:01:22 -0500 From: Xiaoyao Li Subject: [PATCH v2 07/10] i386/cpu: Hoist check of CPUID_EXT3_TOPOEXT against threads_per_core X-Mailer: git-send-email 2.34.1 Now it chan

[PATCH] hw/ufs: Adjust value to match CPU's endian format

2025-01-06 Thread Keoseong Park
In ufs_write_attr_value(), the value parameter is handled in the CPU's endian format but provided in big-endian format by the caller. Thus, it is converted accordingly. Signed-off-by: Keoseong Park --- hw/ufs/ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ufs/ufs.c

Re: [PATCH v4 00/15] vfio: VFIO migration support with vIOMMU

2025-01-06 Thread Zhangfei Gao
Hi, Joao On Fri, Jun 23, 2023 at 5:51 AM Joao Martins wrote: > > Hey, > > This series introduces support for vIOMMU with VFIO device migration, > particurlarly related to how we do the dirty page tracking. > > Today vIOMMUs serve two purposes: 1) enable interrupt remaping 2) > provide dma transla

Re: [PATCH] MAINTAINERS: Add me as the maintainer for ivshmem-flat

2025-01-06 Thread Philippe Mathieu-Daudé
On 7/1/25 02:56, Gustavo Romero wrote: Add me as the maintainer for the ivshmem-flat device. Signed-off-by: Gustavo Romero --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 3/3] virtio: Convert feature properties to OnOffAuto

2025-01-06 Thread Lei Yang
Hi Akihiko I hit qemu core dump when I tested this series of patches with virtio-net regression tests, and based on the test result this bug can be reproduced by just booting a guest. For the details of core dump info please review the attachment. Regards Lei On Sat, Jan 4, 2025 at 3:37 PM Akih

Re: [PATCH v2 01/10] i386/cpu: Extract a common fucntion to setup value of MSR_CORE_THREAD_COUNT

2025-01-06 Thread Xiaoyao Li
On 1/7/2025 12:31 PM, Xiaoyao Li wrote: On 1/3/2025 4:52 PM, Philippe Mathieu-Daudé wrote: On 28/12/24 18:37, Philippe Mathieu-Daudé wrote: On 19/12/24 12:01, Xiaoyao Li wrote: There are duplicated code to setup the value of MSR_CORE_THREAD_COUNT. Extract a common function for it. Signed-off-

Re: [PATCH v2 01/10] i386/cpu: Extract a common fucntion to setup value of MSR_CORE_THREAD_COUNT

2025-01-06 Thread Xiaoyao Li
On 1/3/2025 4:52 PM, Philippe Mathieu-Daudé wrote: On 28/12/24 18:37, Philippe Mathieu-Daudé wrote: On 19/12/24 12:01, Xiaoyao Li wrote: There are duplicated code to setup the value of MSR_CORE_THREAD_COUNT. Extract a common function for it. Signed-off-by: Xiaoyao Li --- Changes in v2: - move

[PATCH v3 4/7] hw/intc/loongarch_ipi: Get cpu number from possible_cpu_arch_ids

2025-01-06 Thread Bibo Mao
Supported CPU number can be acquired from function possible_cpu_arch_ids(), cpu-num property is not necessary. Signed-off-by: Bibo Mao --- hw/intc/loongarch_ipi.c | 13 - include/hw/intc/loongson_ipi_common.h | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) d

[PATCH v3 5/7] hw/intc/loongarch_ipi: Remove num-cpu property

2025-01-06 Thread Bibo Mao
Since cpu number can be acquired from possible_cpu_arch_ids(), num-cpu property is not necessary. Here remove num-cpu property for object iTYPE_LOONGARCH_IPI object. Signed-off-by: Bibo Mao --- hw/intc/loongarch_ipi.c | 5 - hw/loongarch/virt.c | 1 - 2 files changed, 6 deletions(-) dif

[PATCH v3 7/7] hw/intc/loongarch_ipi: Use alternative function cpu_by_arch_id

2025-01-06 Thread Bibo Mao
There is arch_id and CPUState pointer in IPICore object, with function cpu_by_arch_id() it can be implemented by parsing IPICore array. Signed-off-by: Bibo Mao --- hw/intc/loongarch_ipi.c | 36 +++- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/h

[PATCH v3 0/7] hw/intc/loongson_ipi: Remove property num_cpu

2025-01-06 Thread Bibo Mao
Property num_cpu is not necessary, it can be acquired from function possible_cpu_arch_ids(), also adding arch_id and CPUState pointer in IPICore object, so that IPICore object can be parsed from physical cpu id. --- v2 ... v3: 1. Remove TYPE_HOTPLUG_HANDLER interface support 2. Remove nu

[PATCH v3 1/7] hw/intc/loongarch_ipi: Implement realize interface

2025-01-06 Thread Bibo Mao
Add realize interface for loongar ipi device. Signed-off-by: Bibo Mao --- hw/intc/loongarch_ipi.c | 19 +++ include/hw/intc/loongarch_ipi.h | 1 + 2 files changed, 20 insertions(+) diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c index 2ae1a42c46..4e2f9acd

[PATCH v3 6/7] hw/intc/loongson_ipi: Add more output parameter for cpu_by_arch_id

2025-01-06 Thread Bibo Mao
Add logic cpu index output parameter for function cpu_by_arch_id, CPUState::cpu_index is logic cpu slot index for possible_cpus. However it is logic cpu index with LoongsonIPICommonState::IPICore, here hide access for CPUState::cpu_index directly, it comes from function cpu_by_arch_id(). Signed-of

[PATCH v3 2/7] hw/intc/loongson_ipi: Remove num_cpu from loongson_ipi_common

2025-01-06 Thread Bibo Mao
With mips64 loongson ipi, num_cpu property is used, with loongarch ipi, num_cpu can be acquired from possible_cpu_arch_ids. Here remove num_cpu setting from loongson_ipi_common, and this piece of code is put into loongson ipi and loongarch ipi. Signed-off-by: Bibo Mao --- hw/intc/loongarch_ipi.

[PATCH v3 3/7] hw/intc/loongson_ipi: Remove property num_cpu from loongson_ipi_common

2025-01-06 Thread Bibo Mao
With mips64 loongson ipi, num_cpu property is used, with loongarch ipi, num_cpu can be acquired from possible_cpu_arch_ids. Here remove property num_cpu from loongson_ipi_common, and this piece of code is put into loongson ipi and loongarch ipi. Signed-off-by: Bibo Mao --- hw/intc/loongarch_ipi

Re: [PATCH v12 0/6] Add Smrnmi support

2025-01-06 Thread Alistair Francis
On Mon, Jan 6, 2025 at 3:46 PM wrote: > > From: Frank Chang > > This patchset added support for Smrnmi Extension in RISC-V. > > There are four new CSRs and one new instruction added to allow NMI to be > resumable in RISC-V, which are: > > ==

Re: [PATCH v11 2/2] tpm: add backend for mssim

2025-01-06 Thread James Bottomley
On Thu, 2024-12-19 at 17:39 +, Daniel P. Berrangé wrote: > On Thu, Dec 12, 2024 at 12:05:28PM -0500, James Bottomley wrote: > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specification. > > > > https://github.com/Microsoft/ms-tpm-20-ref.git > >

[PATCH] MAINTAINERS: Add me as the maintainer for ivshmem-flat

2025-01-06 Thread Gustavo Romero
Add me as the maintainer for the ivshmem-flat device. Signed-off-by: Gustavo Romero --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2101b51217..461f98525b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2785,6 +2785,13 @@ F: hw/hyperv/hv-

Re: [PATCH v12 5/6] target/riscv: Add Smrnmi cpu extension

2025-01-06 Thread Alistair Francis
On Mon, Jan 6, 2025 at 3:46 PM wrote: > > From: Tommy Wu > > This adds the properties for ISA extension Smrnmi. > > Also, when Smrnmi is present, the firmware (e.g., OpenSBI) must set > mnstatus.NMIE to 1 before enabling any interrupts. Otherwise, all > interrupts will be disabled. Since our curr

Re: [PATCH v12 3/6] target/riscv: Handle Smrnmi interrupt and exception

2025-01-06 Thread Alistair Francis
On Mon, Jan 6, 2025 at 3:47 PM wrote: > > From: Tommy Wu > > Because the RNMI interrupt trap handler address is implementation defined. > We add the 'rnmi-interrupt-vector' and 'rnmi-exception-vector' as the property > of the harts. It’s very easy for users to set the address based on their > exp

Re: [PATCH v2 2/2] tap: Use g_spawn_sync() and g_spawn_check_wait_status()

2025-01-06 Thread Lei Yang
I tested this series of patches with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Sat, Jan 4, 2025 at 4:05 PM Akihiko Odaki wrote: > > g_spawn_sync() gives an informative message if it fails to execute > the script instead of reporting exiting status 1. > > g_spawn

Re: [PATCH v3 0/2] Move net backend cleanup to NIC cleanup

2025-01-06 Thread Lei Yang
I tested this series of patches with virtio-net regression tests,everything works fine. Tested-by: Lei Yang On Mon, Jan 6, 2025 at 11:57 PM Jonah Palmer wrote: > > Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net > structures if peer nic is present") effectively delayed the bac

Re: [PATCH v15 0/7] Pointer Masking update for Zjpm v1.0

2025-01-06 Thread Alistair Francis
On Mon, Jan 6, 2025 at 8:25 PM wrote: > > From: Alexey Baturo > > Hi, > > Rebased against Alistair's riscv-to-apply.next > > Thanks > > [v14]: > Rebased and addressed Alistair's comments on code style. > > > [v13]: > Rebased and addressed Daniel's comments about the return type of the helper. > >

Re: [PATCH v2 0/2] target/riscv: add traces for exceptions

2025-01-06 Thread Alistair Francis
On Tue, Jan 7, 2025 at 3:38 AM Daniel Henrique Barboza wrote: > > Hi, > > This new version is a re-sent of v1, rebased on top of > alistair/riscv-to-apply.next, with acks/r-bs added. > > No other changes made. > > Changes from v1: > - rebased on top of alistair/riscv-to-apply.next > - v1 link: >

Re: [PATCH] binfmt: Don't consider riscv{32, 64} part of the same family

2025-01-06 Thread Alistair Francis
On Tue, Jan 7, 2025 at 3:54 AM Andrea Bolognani wrote: > > On Mon, Jan 06, 2025 at 11:57:58AM +, Daniel P. Berrangé wrote: > > On Mon, Jan 06, 2025 at 11:47:00AM +, Peter Maydell wrote: > > > On Mon, 6 Jan 2025 at 01:29, Alistair Francis > > > wrote: > > > > We didn't get an answer to th

Re: [PATCH 27/73] tcg: Merge TCG_TARGET_HAS_{muls2, mulu2, mulsh, muluh}

2025-01-06 Thread Richard Henderson
On 1/6/25 13:58, Philippe Mathieu-Daudé wrote: On 2/1/25 19:06, Richard Henderson wrote: Signed-off-by: Richard Henderson ---   include/tcg/tcg-opc.h    |  16 ++---   tcg/aarch64/tcg-target-has.h |  12 ++--   tcg/arm/tcg-target-has.h |   8 +--   tcg/i386/tcg-target-has.h

Re: [PATCH 21/73] tcg: Merge TCG_TARGET_HAS_{div,rem,div2}

2025-01-06 Thread Richard Henderson
On 1/6/25 13:49, Philippe Mathieu-Daudé wrote: diff --git a/tcg/ppc/tcg-target-has.h b/tcg/ppc/tcg-target-has.h index a6c7cdba5d..6734fd63e7 100644 --- a/tcg/ppc/tcg-target-has.h +++ b/tcg/ppc/tcg-target-has.h @@ -16,13 +16,14 @@   #define have_altivec   (cpuinfo & CPUINFO_ALTIVEC)   #define have

Re: [PATCH 67/73] tcg: Merge extract, sextract operations

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 7 +++-- tcg/optimize.c | 12 - tcg/tcg-op.c | 20 +++ tcg/tcg.c| 6 ++--- tcg/tci.c

Re: [PATCH 64/73] tcg: Merge integer add2, sub2 operations

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: For TCI, we're losing type information from the interpreter. Limit the opcodes to the host register size; on 64-bit host it's just as easy to reconstruct 64-bit operands for normal add/sub. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h

Re: [PATCH 61/73] tcg: Merge INDEX_op_mov_{i32,i64}

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Begin to rely on TCGOp.type to discriminate operations, rather than two different opcodes. Convert mov first. Introduce TCG_OPF_INT in order to keep opcode dumps the same. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 4 ++-

Re: [PATCH 60/73] tcg: Change have_vec to has_type in tcg_op_supported

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Test each vector type, not just lumping them all together. Add tests for I32 (always true) and I64 (64-bit hosts). Signed-off-by: Richard Henderson --- tcg/tcg.c | 66 --- 1 file changed, 43 inserti

Re: [PATCH 72/73] tcg: Merge bswap operations

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 9 - tcg/optimize.c | 20 +--- tcg/tcg-op.c | 10 +- tcg/tcg.c| 19 +++

Re: [PATCH 53/73] tcg: Use C_NotImplemented in tcg_target_op_def

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Return C_NotImplemented instead of asserting for opcodes not implemented by the backend. Signed-off-by: Richard Henderson --- tcg/tcg.c| 12 ++-- tcg/aarch64/tcg-target.c.inc | 2 +- tcg/arm/tcg-target.c.inc

Re: [PATCH 0/9] ppc/pnv: HOMER and OCC fixes and improvements

2025-01-06 Thread Cédric Le Goater
Hello, On 12/10/24 04:04, Nicholas Piggin wrote: This series makes a bunch of fixes and improvements to the HOMER and OCC unit models for powernv. It gets OPAL OCC code happier again, Nice. I had similar changes exposing pstates and sensors for QEMU. I am glad this is now possible. but requi

Re: [PATCH 27/73] tcg: Merge TCG_TARGET_HAS_{muls2, mulu2, mulsh, muluh}

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 16 ++--- tcg/aarch64/tcg-target-has.h | 12 ++-- tcg/arm/tcg-target-has.h | 8 +-- tcg/i386/tcg-target-has.h| 12 ++-- tcg/loongarch64/tcg-target-has.

Re: [PATCH 25/73] tcg: Merge TCG_TARGET_HAS_rot_{i32,i64}

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Only the integer opcodes handled here; the vector rotates are left for a future patch, as they are split by immediate, scalar, and vector shift count. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 8 tcg/aarch64/tc

Re: [PATCH 21/73] tcg: Merge TCG_TARGET_HAS_{div,rem,div2}

2025-01-06 Thread Philippe Mathieu-Daudé
Hi Richard, On 2/1/25 19:06, Richard Henderson wrote: Pass a type parameter to the macros; this is unused with these opcodes, but will be used with others, so keep it for uniformity. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 24 +++--- tcg/aarch64/tcg-target-h

Re: [PATCH 24/73] tcg: Merge TCG_TARGET_HAS_bswap*

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Merge not only the i32 and i64 alternatives, but all of the different input bit sizes as well. For each tcg target they are all the same. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 10 +- tcg/aarch64/tcg-target-h

Re: [PATCH 21/73] tcg: Merge TCG_TARGET_HAS_{div,rem,div2}

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Pass a type parameter to the macros; this is unused with these opcodes, but will be used with others, so keep it for uniformity. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 24 +++--- tcg/aarch64/tcg-target-has.h |

Re: [RFC PATCH] target/arm/arm-powerctl: Restrict to ARM cores

2025-01-06 Thread Peter Maydell
On Mon, 6 Jan 2025 at 18:23, Philippe Mathieu-Daudé wrote: > > When running on a heterogeneous setup, the CPU_FOREACH() > macro in arm_get_cpu_by_id() iterates on all vCPUs, > regardless they are ARM or not. Check the CPU class type > and skip the non-ARM instances. > > Signed-off-by: Philippe Mat

Re: [PATCH 20/73] tcg: Split out tcg-target-mo.h

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:06, Richard Henderson wrote: Signed-off-by: Richard Henderson --- accel/tcg/internal-target.h | 1 + tcg/aarch64/tcg-target-mo.h | 12 tcg/aarch64/tcg-target.h| 2 -- tcg/arm/tcg-target-mo.h | 13 + tcg/arm/tcg-target.h

Re: [PATCH 18/73] tcg: Move fallback tcg_can_emit_vec_op out of line

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Don't reference TCG_TARGET_MAYBE_vec in a public header. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 7 --- tcg/tcg.c | 4 2 files changed, 4 insertions(+), 7 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 17/73] tcg/tci: Move TCI specific opcodes to tcg-target-opc.h.inc

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Now that tcg-target-opc.h.inc is unconditional, we can move these out of the generic header. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 6 -- tcg/tci/tcg-target-opc.h.inc | 5 - 2 files changed, 4 insertions(+), 7 de

Re: [PATCH 16/73] tcg: Rename tcg-target.opc.h to tcg-target-opc.h.inc

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: In addition, add empty files for mips, sparc64 and tci. Make the include unconditional within tcg-opc.h. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h | 4 +--- tcg/aarch64/{tcg-target.opc.h => tcg-ta

Re: [PATCH 12/73] target/i386: Remove TCG_TARGET_extract_tl_valid

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: This macro is unused. Signed-off-by: Richard Henderson --- target/i386/tcg/emit.c.inc | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 11/73] tcg: Add tcg_op_deposit_valid

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + tcg/tcg.c | 22 ++ 2 files changed, 23 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 13/73] target/i386: Use tcg_op_deposit_valid

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: Avoid direct usage of TCG_TARGET_deposit_*_valid. Signed-off-by: Richard Henderson --- target/i386/tcg/emit.c.inc | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 06/73] tcg: Move call abi parameters from tcg-target.h to tcg-target.c.inc

2025-01-06 Thread Philippe Mathieu-Daudé
On 2/1/25 19:05, Richard Henderson wrote: These defines are not required outside of tcg/tcg.c, which includes tcg-target.c.inc before use. Reduces the exported symbol set of tcg-target.h. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 13 - tcg/arm/tcg-ta

Re: [RFC PATCH 1/6] target: Only link capstone to targets requiring it

2025-01-06 Thread Philippe Mathieu-Daudé
On 5/1/25 01:57, Richard Henderson wrote: On 1/3/25 15:17, Philippe Mathieu-Daudé wrote: No need to link capstone to targets which don't use it. Signed-off-by: Philippe Mathieu-Daudé ---   disas/meson.build    | 1 -   target/arm/meson.build   | 1 +   target/i386/meson.build  | 1 +   target

Re: [RFC PATCH 6/7] accel/hvf: Use CPU_FOREACH_HVF()

2025-01-06 Thread Philippe Mathieu-Daudé
On 6/1/25 21:33, Daniel Henrique Barboza wrote: On 1/6/25 5:02 PM, Philippe Mathieu-Daudé wrote: Only iterate over HVF vCPUs when running HVF specific code. Signed-off-by: Philippe Mathieu-Daudé ---   include/system/hvf_int.h  | 4   accel/hvf/hvf-accel-ops.c | 9 +   target/arm/h

Re: [RFC PATCH 6/7] accel/hvf: Use CPU_FOREACH_HVF()

2025-01-06 Thread Daniel Henrique Barboza
On 1/6/25 5:02 PM, Philippe Mathieu-Daudé wrote: Only iterate over HVF vCPUs when running HVF specific code. Signed-off-by: Philippe Mathieu-Daudé --- include/system/hvf_int.h | 4 accel/hvf/hvf-accel-ops.c | 9 + target/arm/hvf/hvf.c | 4 ++-- 3 files changed, 11 ins

Re: [PATCH 26/71] hw/gpio: Constify all Property

2025-01-06 Thread Miles Glenn
Reviewed-by: Glenn Miles On Fri, 2024-12-13 at 13:07 -0600, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > hw/gpio/imx_gpio.c | 2 +- > hw/gpio/npcm7xx_gpio.c | 2 +- > hw/gpio/omap_gpio.c | 2 +- > hw/gpio/pca9552.c| 2 +- > hw/gpio/pca9554.c|

Re: [PULL 00/17] Migration patches for 2024-12-17

2025-01-06 Thread Peter Xu
On Mon, Jan 06, 2025 at 04:24:53PM -0300, Fabiano Rosas wrote: > Here's the fix for the pre-existing issue in the script: For this patch: > > -- 8< -- > From 5bcad03aad85556a7b72f79d3574e246a99432c3 Mon Sep 17 00:00:00 2001 > From: Fabiano Rosas > Date: Mon, 6 Jan 2025 15:05:31 -0300 > Subject:

Re: [RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation

2025-01-06 Thread Daniel Henrique Barboza
Perhaps add in the commit msg something like "it's only being used in bsd-user and linux-user code" On 1/6/25 5:02 PM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Daniel Henrique Barboza include/hw/core/cpu.h | 3 +++ 1 file changed, 3 insertions

[RFC PATCH 2/7] cpus: Introduce AccelOpsClass::get_cpus_queue()

2025-01-06 Thread Philippe Mathieu-Daudé
We want the ability to iterate over vCPUs of a specific accelerator. Introduce cpus_get_accel_cpus_queue() to be used by accelerator common code, and expose the get_cpus_queue() in AccelOpsClass, so each accelerator can register its own queue of vCPUs. Signed-off-by: Philippe Mathieu-Daudé ---

[RFC PATCH 4/7] accel/tcg: Use CPU_FOREACH_TCG()

2025-01-06 Thread Philippe Mathieu-Daudé
Only iterate over TCG vCPUs when running TCG specific code. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 7 --- accel/tcg/monitor.c | 3 ++- accel/tcg/tb-maint.c | 7 --- accel/tcg/tcg-accel-ops-rr.c | 10 +- accel/tcg/tcg-accel-ops

[RFC PATCH 3/7] accel/tcg: Implement tcg_get_cpus_queue()

2025-01-06 Thread Philippe Mathieu-Daudé
Use a specific vCPUs queue for our unique software accelerator. Register the AccelOpsClass::get_cpus_queue() handler. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.h | 10 ++ accel/tcg/tcg-accel-ops.c | 8 2 files changed, 18 insertions(+) diff --git a/acce

[RFC PATCH 0/7] accel: Add per-accelerator vCPUs queue

2025-01-06 Thread Philippe Mathieu-Daudé
Hi, Currently we register all vCPUs to the global 'cpus_queue' queue, however we can not discriminate per accelerator or per target architecture (which might happen in a soon future). This series tries to add an accelerator discriminator, so accelerator specific code can iterate on its own vCPUs.

[RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation

2025-01-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index c3ca0babcb3..48d90f50a71 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -594,8 +594,11 @@ extern CPUTailQ c

[RFC PATCH 6/7] accel/hvf: Use CPU_FOREACH_HVF()

2025-01-06 Thread Philippe Mathieu-Daudé
Only iterate over HVF vCPUs when running HVF specific code. Signed-off-by: Philippe Mathieu-Daudé --- include/system/hvf_int.h | 4 accel/hvf/hvf-accel-ops.c | 9 + target/arm/hvf/hvf.c | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/system/hv

[RFC PATCH 7/7] accel/kvm: Use CPU_FOREACH_KVM()

2025-01-06 Thread Philippe Mathieu-Daudé
Only iterate over KVM vCPUs when running KVM specific code. Signed-off-by: Philippe Mathieu-Daudé --- include/system/kvm_int.h | 3 +++ accel/kvm/kvm-all.c | 14 +++--- hw/i386/kvm/clock.c | 3 ++- hw/intc/spapr_xive_kvm.c | 5 +++-- hw/intc/x

[RFC PATCH 5/7] accel/hw: Implement hw_accel_get_cpus_queue()

2025-01-06 Thread Philippe Mathieu-Daudé
We can only run a single hardware accelerator at a time, so add a generic hw_accel_get_cpus_queue() helper in accel-system.c, a file common to all HW accelerators. Register AccelOpsClass::get_cpus_queue() for each HW accelerator. Add a generic CPU_FOREACH_HWACCEL() macro. Signed-off-by: Philippe

Re: [PULL 00/17] Migration patches for 2024-12-17

2025-01-06 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Jan 03, 2025 at 07:34:08PM -0300, Fabiano Rosas wrote: >> Fabiano Rosas writes: >> >> > Stefan Hajnoczi writes: >> > >> >> On Fri, 3 Jan 2025 at 13:32, Fabiano Rosas wrote: >> >>> >> >>> Thomas Huth writes: >> >>> >> >>> > On 20/12/2024 17.28, Peter Xu wrote: >> >>

Re: [RFC PATCH] target/arm/arm-powerctl: Restrict to ARM cores

2025-01-06 Thread Daniel Henrique Barboza
On 1/6/25 3:23 PM, Philippe Mathieu-Daudé wrote: When running on a heterogeneous setup, the CPU_FOREACH() macro in arm_get_cpu_by_id() iterates on all vCPUs, regardless they are ARM or not. Check the CPU class type and skip the non-ARM instances. Signed-off-by: Philippe Mathieu-Daudé --- R

Re: [PULL 00/17] Migration patches for 2024-12-17

2025-01-06 Thread Peter Xu
On Fri, Jan 03, 2025 at 07:34:08PM -0300, Fabiano Rosas wrote: > Fabiano Rosas writes: > > > Stefan Hajnoczi writes: > > > >> On Fri, 3 Jan 2025 at 13:32, Fabiano Rosas wrote: > >>> > >>> Thomas Huth writes: > >>> > >>> > On 20/12/2024 17.28, Peter Xu wrote: > >>> >> On Thu, Dec 19, 2024 at 03

Re: [PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG)

2025-01-06 Thread Daniel P . Berrangé
On Sat, Jan 04, 2025 at 12:28:14PM +0100, Phil Dennis-Jordan wrote: > On Fri, 3 Jan 2025 at 16:16, Daniel P. Berrangé wrote: > > > On Fri, Jan 03, 2025 at 04:05:58PM +0100, Philippe Mathieu-Daudé wrote: > > > As Daniel suggested [*]: > > > > > > > We should consider to rank HVF above TCG, on the

QEMU 10.0 release schedule

2025-01-06 Thread Stefan Hajnoczi
Dear QEMU community, Below is a draft release schedule for QEMU 10.0. Please let me know if you see issues with public holidays or other dates that would prevent us from rolling this release in mid to late March. 2024-12-11 Beginning of development phase 2025-03-11 Soft feature freeze. Only bug fi

[RFC PATCH] target/arm/arm-powerctl: Restrict to ARM cores

2025-01-06 Thread Philippe Mathieu-Daudé
When running on a heterogeneous setup, the CPU_FOREACH() macro in arm_get_cpu_by_id() iterates on all vCPUs, regardless they are ARM or not. Check the CPU class type and skip the non-ARM instances. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/arm-powerctl.c | 6 -- 1 file changed, 4

Re: [PATCH] binfmt: Don't consider riscv{32, 64} part of the same family

2025-01-06 Thread Andrea Bolognani
On Mon, Jan 06, 2025 at 11:57:58AM +, Daniel P. Berrangé wrote: > On Mon, Jan 06, 2025 at 11:47:00AM +, Peter Maydell wrote: > > On Mon, 6 Jan 2025 at 01:29, Alistair Francis wrote: > > > We didn't get an answer to the issue of a CPU supporting RV32 and yet > > > the kernel still calls QEM

[PATCH v2 1/2] target/riscv: use RISCVException enum in exception helpers

2025-01-06 Thread Daniel Henrique Barboza
Do a cosmetic change in riscv_raise_exception() to change 'exception' type from uint32_t to RISCVException, making it a bit clear that the arg is directly correlated to the RISCVException enum. As a side effect, change 'excp' type from int to RISCVException in generate_exception() to guarantee tha

[PATCH v2 2/2] target/riscv: add trace in riscv_raise_exception()

2025-01-06 Thread Daniel Henrique Barboza
When using system mode we can get the CPU traps being taken via the 'riscv_trap' trace or the "-d int" qemu log. User mode does not a way of logging/showing exceptions to users. Add a trace in riscv_raise_exception() to allow qemu-riscv(32/64) users to check all exceptions being thrown. This is pa

[PATCH v2 0/2] target/riscv: add traces for exceptions

2025-01-06 Thread Daniel Henrique Barboza
Hi, This new version is a re-sent of v1, rebased on top of alistair/riscv-to-apply.next, with acks/r-bs added. No other changes made. Changes from v1: - rebased on top of alistair/riscv-to-apply.next - v1 link: https://lore.kernel.org/qemu-riscv/20241219174657.1988767-1-dbarb...@ventanamicro.co

Re: [PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG)

2025-01-06 Thread Richard Henderson
On 1/3/25 07:05, Philippe Mathieu-Daudé wrote: As Daniel suggested [*]: We should consider to rank HVF above TCG, on the basis that HW acceleration is faster and should provide a host<->guest security boundary that we don't claim for TCG [*] https://lore.kernel.org/qemu-devel/z07yasl2pd3cp...

Re: [PATCH 0/5] semihosting: Reduce target specific code

2025-01-06 Thread Richard Henderson
On 1/3/25 09:10, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (5): semihosting/syscalls: Include missing 'exec/cpu-defs.h' header semihosting/uaccess: Include missing 'exec/cpu-all.h' header semihosting/arm-compat: Include missing 'cpu.h' header semihosting/console: Avoid incl

Re: test_x86_64_hotplug_cpu.py times out frequently in CI

2025-01-06 Thread Peter Maydell
On Mon, 6 Jan 2025 at 16:45, Stefan Hajnoczi wrote: > > Hi Thomas, > test_x86_64_hotplug_cpu.py times out frequently in CI runs. Here is an > example: > https://gitlab.com/qemu-project/qemu/-/jobs/8777540230#L1151 > > The detailed test logs are here: > https://gitlab.com/qemu-project/qemu/-/jobs/

test_x86_64_hotplug_cpu.py times out frequently in CI

2025-01-06 Thread Stefan Hajnoczi
Hi Thomas, test_x86_64_hotplug_cpu.py times out frequently in CI runs. Here is an example: https://gitlab.com/qemu-project/qemu/-/jobs/8777540230#L1151 The detailed test logs are here: https://gitlab.com/qemu-project/qemu/-/jobs/8777540230/artifacts/browse/build/tests/functional/x86_64/test_x86_64

Re: [PATCH v2 0/2] Move net backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
On 12/23/24 11:33 AM, Eugenio Perez Martin wrote: On Fri, Dec 20, 2024 at 10:02 PM Michael Tokarev wrote: 12.09.2024 19:54, Eugenio Pérez wrote: Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, al

Re: [PATCH] hw/i386/pc: Fix level interrupt sharing for Xen event channel GSI

2025-01-06 Thread David Woodhouse
On Thu, 2024-12-19 at 17:24 +0100, David Woodhouse wrote: > From: David Woodhouse > > The system GSIs are not designed for sharing. One device might assert a > shared interrupt with qemu_set_irq() and another might deassert it, and > the level from the first device is lost. > > This could be sol

Re: [PATCH v5] hw/acpi: Add vmclock device

2025-01-06 Thread David Woodhouse
On Thu, 2024-12-19 at 18:24 +0100, David Woodhouse wrote: > On Tue, 2024-12-03 at 17:33 +, David Woodhouse wrote: > > From: David Woodhouse > > > > The vmclock device addresses the problem of live migration with > > precision clocks. The tolerances of a hardware counter (e.g. TSC) are > > typ

[PATCH v3 0/2] Move net backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, allowing the frontend or the guest to access it resources as long as the frontend NIC is still visible to the guest. However it does not clean up the resou

[PATCH v3 2/2] net: move backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
From: Eugenio Pérez Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, allowing the frontend or the guest to access it resources as long as the frontend is still visible to the guest. However it does not

[PATCH v3 1/2] net: parameterize the removing client from nc list

2025-01-06 Thread Jonah Palmer
From: Eugenio Pérez This change is used in later commits so we can avoid the removal of the netclient if it is delayed. No functional change intended. Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eugenio Pérez --- net/net.c | 13 - 1 file changed, 8 insertions(+),

Re: [PATCH 0/2] Disable unavailable features on older macOS

2025-01-06 Thread Daniel P . Berrangé
On Mon, Jan 06, 2025 at 07:26:20AM -0800, Joelle van Dyne wrote: > If the policy is macOS 12 or later then you still need patch 2-3 because > currently it is broken on macOS 12. Actually our min baseline for macOS is currently macOS 14. Per the doc Peter mentions, we officially target the most re

Re: [PATCH 1/2] optimize the dirtylimit_throttle_pct trace event

2025-01-06 Thread fuqiang wang
On 2025/1/6 21:38, fuqiang wang wrote: I'm sorry for getting back to you after a few days. 在 2025/1/3 00:40, Yong Huang 写道: > > > On Tue, Dec 31, 2024 at 9:56 AM fuqiang wang wrote: > > The current dirtylimit_throttle_pct trace event is triggered when the > throttle time is adjusted li

Re: [PATCH 0/2] Disable unavailable features on older macOS

2025-01-06 Thread Joelle van Dyne
If the policy is macOS 12 or later then you still need patch 2-3 because currently it is broken on macOS 12. On Monday, January 6, 2025, Peter Maydell wrote: > On Mon, 23 Dec 2024 at 04:10, Joelle van Dyne wrote: > > Some features require APIs introduced in a recent version of macOS. > Currentl

Re: [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

2025-01-06 Thread Paolo Bonzini
Il lun 6 gen 2025, 14:32 Peter Maydell ha scritto: > I think here I agree with Philippe that we might as well > provide only the new API to Rust devices. > Ok, I wasn't thinking of doing that because there isn't right now an easy way to add interfaces to Rust-defined classes. However, all device

  1   2   >