Re: [PATCH 11/13] qapi: make all generated files common

2025-05-07 Thread Philippe Mathieu-Daudé
On 8/5/25 01:14, Pierrick Bouvier wrote: Signed-off-by: Pierrick Bouvier --- qapi/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 07/13] qapi: add access to qemu/target-info.h

2025-05-07 Thread Philippe Mathieu-Daudé
On 8/5/25 01:14, Pierrick Bouvier wrote: Add a default include qemu/target-info.h in QAPI generated code. This allows runtime conditionals to use any function defined in this header. Signed-off-by: Pierrick Bouvier --- scripts/qapi/commands.py | 2 ++ scripts/qapi/introspect.py | 1 + scr

Re: [PATCH 10/13] qapi: add weak stubs for target specific commands

2025-05-07 Thread Philippe Mathieu-Daudé
On 8/5/25 01:14, Pierrick Bouvier wrote: We are about to expose various target specific commands for all targets, so we need to stub not implemented qmp_* functions. MinGW does not support weak symbols without at least one strong definition, so we'll have to detail stubs per target. Sad. Signed

Re: [PATCH 01/13] qapi: introduce 'runtime_if' for QAPI json

2025-05-07 Thread Philippe Mathieu-Daudé
On 8/5/25 01:14, Pierrick Bouvier wrote: This new entry can be used in QAPI json to specify a runtime conditional to expose any entry, similar to existing 'if', that applies at compile time, thanks to ifdef. The element is always defined in C, but not exposed through the schema and visit function

Re: [PATCH 09/13] qapi: transform target specific 'if' in runtime checks

2025-05-07 Thread Philippe Mathieu-Daudé
On 8/5/25 01:14, Pierrick Bouvier wrote: Signed-off-by: Pierrick Bouvier --- qapi/machine-target.json | 84 qapi/misc-target.json| 48 --- scripts/qapi/expr.py | 9 +++-- 3 files changed, 81 insertions(+), 60 deletions(-)

Re: [PATCH 03/12] target: Use cpu_pointer_wrap_uint32 for 32-bit targets

2025-05-07 Thread Bastian Koppelmann
On Sun, May 04, 2025 at 01:57:04PM -0700, Richard Henderson wrote: > M68K, MicroBlaze, OpenRISC, RX, TriCore and Xtensa are > all 32-bit targets. AVR is more complicated, but using > a 32-bit wrap preserves current behaviour. > > Cc: Michael Rolnik > Cc: Laurent Vivier > Cc: Edgar E. Iglesias

Re: [PATCH 08/13] qemu/target-info: implement missing helpers

2025-05-07 Thread Philippe Mathieu-Daudé
On 8/5/25 01:14, Pierrick Bouvier wrote: Add runtime helpers for target and config queries. Note: This will be reimplemented later [1] using proper information in TargetInfo. Meanwhile, just add a simple implementation. [1] https://patchew.org/QEMU/20250424222112.36194-1-phi...@linaro.org/2025

Re: [PATCH v8 54/55] i386/tdx: Validate phys_bits against host value

2025-05-07 Thread Xiaoyao Li
On 5/5/2025 11:29 PM, Zhao Liu wrote: @e -875,6 +876,13 @@ static int tdx_check_features(X86ConfidentialGuest *cg, CPUState *cs) return -1; Here you has already used "return -1", so... } +if (cpu->phys_bits != host_cpu_phys_bits()) { +error_report("TDX require

Re: [PATCH v8 46/55] i386/tdx: Add supported CPUID bits related to TD Attributes

2025-05-07 Thread Xiaoyao Li
On 5/6/2025 7:31 PM, Zhao Liu wrote: On Tue, Apr 01, 2025 at 09:01:56AM -0400, Xiaoyao Li wrote: Date: Tue, 1 Apr 2025 09:01:56 -0400 From: Xiaoyao Li Subject: [PATCH v8 46/55] i386/tdx: Add supported CPUID bits related to TD Attributes X-Mailer: git-send-email 2.34.1 For TDX, some CPUID fe

Re: [v2] hw/arm/npcm8xx_boards: Add auto zero flash image and device part number

2025-05-07 Thread Philippe Mathieu-Daudé
Hi Tim, On 8/5/25 04:15, Tim Lee wrote: Fix flash device part number to `mx66l1g45g` according image-bmc run on npcm8xx evb board (SPIFlash...SF: Detected mx66l1g45g, total 128 MiB) And add auto zero flash image size to resolve error below after executing `./qemu-system-aarch64 -machine npcm845

Re: [PATCH v8 28/55] i386/tdx: Handle KVM_SYSTEM_EVENT_TDX_FATAL

2025-05-07 Thread Xiaoyao Li
On 4/28/2025 11:00 PM, Zhao Liu wrote: On Tue, Apr 01, 2025 at 09:01:38AM -0400, Xiaoyao Li wrote: Date: Tue, 1 Apr 2025 09:01:38 -0400 From: Xiaoyao Li Subject: [PATCH v8 28/55] i386/tdx: Handle KVM_SYSTEM_EVENT_TDX_FATAL X-Mailer: git-send-email 2.34.1 TD guest can use TDG.VP.VMCALL to requ

Re: [PATCH v2 2/2] block/null: Add read-pattern option

2025-05-07 Thread Markus Armbruster
Nir Soffer writes: > When the `read-zeroes` is set, reads produce zeroes, and block status > return BDRV_BLOCK_ZERO, emulating a sparse image. > > If we don't set `read-zeros` we report BDRV_BLOCK_DATA, but image data > is undefined; posix_memalign, _aligned_malloc, valloc, or memalign do > not p

Re: [PATCH v2 1/2] block/null: Report DATA if not reading zeroes

2025-05-07 Thread Markus Armbruster
Markus Armbruster writes: > Markus Armbruster writes: > >> Nir Soffer writes: [...] >>> diff --git a/qapi/block-core.json b/qapi/block-core.json >>> index b1937780e1..7c95c9e36a 100644 >>> --- a/qapi/block-core.json >>> +++ b/qapi/block-core.json >>> @@ -3293,8 +3293,9 @@ ## # @Bloc

Re: [PATCH v2 1/2] block/null: Report DATA if not reading zeroes

2025-05-07 Thread Markus Armbruster
Markus Armbruster writes: > Nir Soffer writes: > >> If read-zeroes is not set, we did not report BDRV_BLOCK_DATA or >> BDRV_BLOCK_ZERO. This is not consistent with other drivers and can >> confuse users or other programs: >> >> % qemu-img map --output json "json:{'driver': 'raw', 'file': {'d

Re: [PATCH v2 1/2] block/null: Report DATA if not reading zeroes

2025-05-07 Thread Markus Armbruster
Nir Soffer writes: > If read-zeroes is not set, we did not report BDRV_BLOCK_DATA or > BDRV_BLOCK_ZERO. This is not consistent with other drivers and can > confuse users or other programs: > > % qemu-img map --output json "json:{'driver': 'raw', 'file': {'driver': > 'null-co', 'size': '1g'}}

Re: [PATCH 4/4] tests/tcg/x86_64/fma: add test for exact-denormal output

2025-05-07 Thread Zhao Liu
On Thu, Feb 13, 2025 at 02:26:13PM +, Peter Maydell wrote: > Date: Thu, 13 Feb 2025 14:26:13 + > From: Peter Maydell > Subject: [PATCH 4/4] tests/tcg/x86_64/fma: add test for exact-denormal > output > X-Mailer: git-send-email 2.43.0 > > Add some fma test cases that check for correct hand

Re: [PATCH 3/4] target/i386: Wire up MXCSR.DE and FPUS.DE correctly

2025-05-07 Thread Zhao Liu
On Thu, Feb 13, 2025 at 02:26:12PM +, Peter Maydell wrote: > Date: Thu, 13 Feb 2025 14:26:12 + > From: Peter Maydell > Subject: [PATCH 3/4] target/i386: Wire up MXCSR.DE and FPUS.DE correctly > X-Mailer: git-send-email 2.43.0 > > The x86 DE bit in the FPU and MXCSR status is supposed to b

[v2] hw/arm/npcm8xx_boards: Add auto zero flash image and device part number

2025-05-07 Thread Tim Lee
Fix flash device part number to `mx66l1g45g` according image-bmc run on npcm8xx evb board (SPIFlash...SF: Detected mx66l1g45g, total 128 MiB) And add auto zero flash image size to resolve error below after executing `./qemu-system-aarch64 -machine npcm845-evb -drive file=image-bmc` Error message:

RE: [v2] tests/qtest: Add qtest for NPCM8XX PSPI module

2025-05-07 Thread kft...@nuvoton.com
From: Tim Lee Sent: Wednesday, May 7, 2025 5:19 PM To: faro...@suse.de; lviv...@redhat.com; pbonz...@redhat.com; wuhao...@google.com; CS20 KFTing ; CS20 CHLi30 Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; Tim Lee Subject: [v2] tests/qtest: Add qtest for NPCM8XX PSPI module - Created qt

Re: [PULL 05/22] target/i386/hvf: Include missing 'exec/target_page.h' header

2025-05-07 Thread Wei Liu
On Wed, May 07, 2025 at 01:20:49PM +0200, Philippe Mathieu-Daudé wrote: > Hi Wei, > > On 7/5/25 08:35, Wei Liu wrote: > > On Tue, May 06, 2025 at 04:34:54PM +0200, Philippe Mathieu-Daudé wrote: > > > Include "exec/target_page.h" to be able to compile HVF on x86_64: > > > > > >../target/i386/h

[PATCH v7 42/49] target/arm/tcg/hflags: compile file twice (system, user)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/hflags.c| 4 +++- target/arm/tcg/meson.build | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/hflags.c b/target/arm/tcg/hflags.c index fd407a7b28e..1ccec63bbd4 100644

[RFC 0/4] virtio-blk: Add support for FUA write requests

2025-05-07 Thread Alberto Faria
There is a proposal to introduce virtio-blk fua write support to the virtio spec [1], and a matching kernel RFC [2]. This series implements the proposal by adding VIRTIO_BLK_{F,T}_OUT_FUA uapi definitions and corresponding virtio-blk, vhost-user-blk, and vduse-blk support. [1] https://lore.kernel

[RFC 4/4] vduse-blk: Add VIRTIO_BLK_T_OUT_FUA command support

2025-05-07 Thread Alberto Faria
Signed-off-by: Alberto Faria --- block/export/vduse-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/export/vduse-blk.c b/block/export/vduse-blk.c index bd852e538dc..36c3c0a56e6 100644 --- a/block/export/vduse-blk.c +++ b/block/export/vduse-blk.c @@ -329,7 +329,8

[RFC 2/4] virtio-blk: Add VIRTIO_BLK_T_OUT_FUA command support

2025-05-07 Thread Alberto Faria
Signed-off-by: Alberto Faria --- block/export/virtio-blk-handler.c | 7 ++-- hw/block/virtio-blk.c | 2 ++ hw/core/machine.c | 4 ++- hw/virtio/virtio-qmp.c| 2 ++ tests/qtest/virtio-blk-test.c | 56 +++ 5 files changed,

[RFC 1/4] include: Add tentative virtio-blk FUA write definitions

2025-05-07 Thread Alberto Faria
Signed-off-by: Alberto Faria --- include/standard-headers/linux/virtio_blk.h | 4 1 file changed, 4 insertions(+) diff --git a/include/standard-headers/linux/virtio_blk.h b/include/standard-headers/linux/virtio_blk.h index d7be3cf5e42..67a373e7967 100644 --- a/include/standard-headers/linu

[RFC 3/4] vhost-user-blk: Add VIRTIO_BLK_T_OUT_FUA command support

2025-05-07 Thread Alberto Faria
Signed-off-by: Alberto Faria --- block/export/vhost-user-blk-server.c| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 16 +-- hw/block/vhost-user-blk.c | 3 ++ hw/core/machine.c | 1 + tests/qtest/vhost-user-blk-test.c | 56

[PATCH v2 03/10] cxl/type3: Add dsmas_flags to CXLDCRegion struct

2025-05-07 Thread anisa . su887
From: Anisa Su Add booleans to DC Region struct to represent dsmas flags (defined in CDAT) in preparation for the next command, which returns the flags in the response. Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 8 +++- include/hw/cxl/cxl_device.h | 15 +++ 2 fi

[PATCH v2 06/10] hw/cxl_type3: Add DC Region bitmap lock

2025-05-07 Thread anisa . su887
From: Anisa Su Add a lock on the bitmap of each CXLDCRegion in preparation for the next patch which implements FMAPI Set DC Region Configuration. This command can modify the block size, which means the region's bitmap must be updated accordingly. The lock becomes necessary when commands that add

[PATCH v2 07/10] cxl-mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section 7.6.7.6.3 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 97 hw/mem/cxl_type3.c | 2 +- include/hw/cxl/cxl_device.h | 3 ++ include/hw/cxl/cxl_mai

[PATCH v2 09/10] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section 7.6.7.6.5 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 195 +++ hw/mem/cxl_type3.c | 8 +- include/hw/cxl/cxl_device.h | 4 + include/hw/cxl/cxl_op

[PATCH v2 08/10] cxl-mailbox-utils: 0x5603 - FMAPI Get DC Region Extent Lists

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5603 implemented per CXL r3.2 Spec Section 7.6.7.6.4 Very similar to previously implemented command 0x4801. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 75 include/hw/cxl/cxl_opcodes.h | 1 + 2 file

[PATCH v2 04/10] cxl-mailbox-utils: 0x5601 - FMAPI Get Host Region Config

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5601 implemented per CXL r3.2 Spec Section 7.6.7.6.2 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 102 +++ include/hw/cxl/cxl_opcodes.h | 1 + 2 files changed, 103 insertions(+) diff --git a/hw/cxl/cxl-

[PATCH v2 00/10] CXL: FMAPI DCD Management Commands 0x5600-0x5605

2025-05-07 Thread anisa . su887
From: Anisa Su This patchset adds support for 6 FM API DCD Management commands (0x5600-0x5605) according to the CXL r3.2 Spec. It is based on the following branch: https://gitlab.com/jic23/qemu/-/tree/cxl-2025-02-20. The code was tested with libcxlmi, which runs in the QEMU VM and sends 56xxh co

[PATCH v2 10/10] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section 7.6.7.6.6 Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 56 include/hw/cxl/cxl_opcodes.h | 1 + 2 files changed, 57 insertions(+) diff --git a/hw/cxl/cxl-mai

[PATCH v2 05/10] cxl_events.h: Move definition for dynamic_capacity_uuid and enum for DC event types

2025-05-07 Thread anisa . su887
From: Anisa Su Move definition/enum to cxl_events.h for shared use in next patch Signed-off-by: Anisa Su --- hw/mem/cxl_type3.c | 15 --- include/hw/cxl/cxl_events.h | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/mem/cxl_type3.c b

[PATCH v2 02/10] cxl-mailbox-utils: 0x5600 - FMAPI Get DCD Info

2025-05-07 Thread anisa . su887
From: Anisa Su FM DCD Management command 0x5600 implemented per CXL 3.2 Spec Section 7.6.7.6.1. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 56 hw/cxl/i2c_mctp_cxl.c| 6 ++-- hw/mem/cxl_type3.c | 4 +++ include/hw/cxl/cxl_

[PATCH v2 01/10] cxl-mailbox-utils: Move opcodes enum to new header file

2025-05-07 Thread anisa . su887
From: Anisa Su In preparation for the next patch, move opcodes enum to new cxl_opcodes.h file for visibility from mailbox-utils.c and i2c_mctp_cxl.c, which checks that certain command sets are bound with the correct MCTP binding. Signed-off-by: Anisa Su --- hw/cxl/cxl-mailbox-utils.c | 68 ++

[PATCH v7 21/49] target/arm/helper: replace target_ulong by vaddr

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 941fc35d24d..2e57fa80b08 100644 --- a/target/arm/helper.

[PATCH v7 49/49] target/arm/tcg/vfp_helper: compile file twice (system, user)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/vfp_helper.c | 4 +++- target/arm/tcg/meson.build | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/vfp_helper.c b/target/arm/tcg/vfp_helper.c index b32e2f4e27c..b1324c5c0a6 10

[PATCH v7 33/49] target/arm/meson: accelerator files are not needed in user mode

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 151184da71c..29a36fb3c5e 100644 --- a/target/arm/meson.build +++ b/target/arm/m

[PATCH v7 06/49] target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c

2025-05-07 Thread Pierrick Bouvier
Allow to get rid of CONFIG_KVM in target/arm/cpu.c Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/kvm_arm.h | 2 ++ target/arm/cpu.c | 31 --- target/arm/kvm-stub.c | 5 + target/arm/kvm.

[PATCH v7 18/49] target/arm/debug_helper: remove target_ulong

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/debug_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index cad0a5db707..69fb1d0d9ff 100644 --- a/

[PATCH v7 25/49] target/arm/vfp_fpscr: compile file twice (user, system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index c8c80c3f969..06d479570e2 100644 --- a/target/arm/meson.build +++ b/target/arm/meso

[PATCH v7 31/49] target/arm/ptw: replace TARGET_AARCH64 by CONFIG_ATOMIC64 from arm_casq_ptw

2025-05-07 Thread Pierrick Bouvier
This function needs 64 bit compare exchange, so we hide implementation for hosts not supporting it (some 32 bit target, which don't run 64 bit guests anyway). Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH v7 12/49] target/arm/cpu32-stubs.c: compile file twice (user, system)

2025-05-07 Thread Pierrick Bouvier
It could be squashed with commit introducing it, but I would prefer to introduce target/arm/cpu.c first. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/arm/meson.

[PATCH v7 44/49] target/arm/tcg/neon_helper: compile file twice (system, user)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/neon_helper.c | 4 +++- target/arm/tcg/meson.build | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/neon_helper.c b/target/arm/tcg/neon_helper.c index e2cc7cf4ee6..2cc8241f1e

[PATCH v7 13/49] tcg: add vaddr type for helpers

2025-05-07 Thread Pierrick Bouvier
Defined as an alias of i32/i64 depending on host pointer size. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/tcg/tcg-op-common.h| 1 + include/tcg/tcg.h | 14 ++ include/exec/helper-head.h.inc | 11 +++ tcg/tcg.c

[PATCH v7 11/49] target/arm/cpu: compile file twice (user, system) only

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index c39ddc4427b..89e305eb56a 100644 --- a/target/arm/meson.build +++ b/target/arm

[PATCH v7 38/49] target/arm/kvm-stub: add missing stubs

2025-05-07 Thread Pierrick Bouvier
Those become needed once kvm_enabled can't be known at compile time. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm-stub.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c index 4806365cdc5..34e57fab

[PATCH v7 40/49] target/arm/tcg/vec_internal: use forward declaration for CPUARMState

2025-05-07 Thread Pierrick Bouvier
Needed so this header can be included without requiring cpu.h. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/vec_internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/tcg/vec_internal.h b/target/arm/tcg/vec_internal.h index 6b93b5aeb94..

[PATCH v7 19/49] target/arm/debug_helper: compile file twice (user, system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index de214fe5d56..48a6bf59353 100644 --- a/target/arm/meson.build +++ b/target

[PATCH v7 24/49] target/arm/helper: compile file twice (user, system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 48a6bf59353..c8c80c3f969 100644 --- a/target/arm/meson.build +++ b/target/arm/meso

[PATCH v7 45/49] target/arm/tcg/tlb_helper: compile file twice (system, user)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/tlb_helper.c | 3 ++- target/arm/tcg/meson.build | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c index d9e6c827d43..23c72a99f5c 100

[PATCH v7 37/49] target/arm/machine: move cpu_post_load kvm bits to kvm_arm_cpu_post_load function

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm_arm.h | 4 +++- target/arm/kvm.c | 13 - target/arm/machine.c | 8 +--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index b638e0

[PATCH v7 43/49] target/arm/tcg/iwmmxt_helper: compile file twice (system, user)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/iwmmxt_helper.c | 4 +++- target/arm/tcg/meson.build | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/iwmmxt_helper.c b/target/arm/tcg/iwmmxt_helper.c index 610b1b2103e..ba

[PATCH v7 10/49] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features

2025-05-07 Thread Pierrick Bouvier
Need to stub cpu64 finalize functions. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/cpu.c | 2 -- target/arm/cpu32-stubs.c | 26 ++ target/arm/meson.build | 11 +++ 3 files changed,

[PATCH v7 47/49] target/arm/tcg/tlb-insns: compile file once (system)

2025-05-07 Thread Pierrick Bouvier
aarch64 specific code is guarded by cpu_isar_feature(aa64*), so it's safe to expose it. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/tlb-insns.c | 7 --- target/arm/tcg/meson.build | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tar

[PATCH v7 41/49] target/arm/tcg/crypto_helper: compile file once

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/crypto_helper.c | 6 -- target/arm/tcg/meson.build | 5 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/crypto_helper.c b/target/arm/tcg/crypto_helper.c index 7cadd61e124

[PATCH v7 32/49] target/arm/ptw: compile file once (system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 6e0327b6f5b..151184da71c 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.

[PATCH v7 35/49] target/arm/machine: reduce migration include to avoid target specific definitions

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/machine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/machine.c b/target/arm/machine.c index 978249fb71b..f7956898fa1 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@

[PATCH v7 46/49] target/arm/helper: restrict define_tlb_insn_regs to system target

2025-05-07 Thread Pierrick Bouvier
Allows to include target/arm/tcg/tlb-insns.c only for system targets. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index e3ca4f5187d..0f3d11b0e12 100644 ---

[PATCH v7 29/49] target/arm/cortex-regs: compile file once (system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 7db573f4a97..6e0327b6f5b 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.

[PATCH v7 23/49] target/arm/helper: remove remaining TARGET_AARCH64

2025-05-07 Thread Pierrick Bouvier
They were hiding aarch64_sve_narrow_vq and aarch64_sve_change_el, which we can expose safely. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helpe

[PATCH v7 08/49] target/arm/cpu: remove TARGET_BIG_ENDIAN dependency

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Reviewed-by: Anton Johansson Signed-off-by: Pierrick Bouvier --- target/arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index d062829ec14..b0eb02c88ba 100644 --- a/target/arm/cpu.c +++ b/target/ar

[PATCH v7 07/49] accel/hvf: add hvf_enabled() for common code

2025-05-07 Thread Pierrick Bouvier
Other accelerators define a CONFIG_{accel}_IS_POSSIBLE when COMPILING_PER_TARGET is not defined, except hvf. Without this change, target/arm/cpu.c can't find hvf_enabled. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/system/hvf.h | 14 +- accel/hvf/hvf

[PATCH v7 04/49] target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h

2025-05-07 Thread Pierrick Bouvier
Add a forward decl for struct kvm_vcpu_init to avoid pulling all kvm headers. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm_arm.h | 83 +-- target/arm/kvm-stub.c | 77 +++ 2 files ch

[PATCH v7 48/49] target/arm/tcg/arith_helper: compile file once

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/tcg/arith_helper.c | 5 +++-- target/arm/tcg/meson.build| 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/arith_helper.c b/target/arm/tcg/arith_helper.c index 9a555c7966c..670139

[PATCH v7 27/49] target/arm/arch_dump: compile file once (system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 06d479570e2..95a2b077dd6 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.

[PATCH v7 26/49] target/arm/arch_dump: remove TARGET_AARCH64 conditionals

2025-05-07 Thread Pierrick Bouvier
Associated code is protected by cpu_isar_feature(aa64*) Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/arch_dump.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/arm/arch_dump.c b/target/arm/arch_dump.c index c

[PATCH v7 05/49] target/arm/kvm-stub: add kvm_arm_reset_vcpu stub

2025-05-07 Thread Pierrick Bouvier
Needed in target/arm/cpu.c once kvm is possible. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm-stub.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c index 2b73d0598c1..e34d3f5e6b4 100644 --- a/target/arm

[PATCH v7 28/49] target/arm/arm-powerctl: compile file once (system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 95a2b077dd6..7db573f4a97 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.

[PATCH v7 03/49] meson: add common libs for target and target_system

2025-05-07 Thread Pierrick Bouvier
Following what we did for hw/, we need target specific common libraries for target. We need 2 different libraries: - code common to a base architecture - system code common to a base architecture For user code, it can stay compiled per target for now. Reviewed-by: Richard Henderson Signed-off-by

[PATCH v7 17/49] target/arm/debug_helper: only include common helpers

2025-05-07 Thread Pierrick Bouvier
Avoid pulling helper.h which contains TARGET_AARCH64. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/debug_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index de7999f6a94..cad0

[PATCH v7 14/49] target/arm/helper: use vaddr instead of target_ulong for exception_pc_alignment

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/helper.h| 2 +- target/arm/tcg/tlb_helper.c| 2 +- target/arm/tcg/translate-a64.c | 2 +- target/arm/tcg/translate.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm

[PATCH v7 15/49] target/arm/helper: use vaddr instead of target_ulong for probe_access

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/helper.h| 2 +- target/arm/tcg/op_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.h b/target/arm/helper.h index 95b9211c6f4..0a4fc90fa8b 100644 --- a/target/arm

[PATCH v7 30/49] target/arm/ptw: replace target_ulong with int64_t

2025-05-07 Thread Pierrick Bouvier
sextract64 returns a signed value. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/ptw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 89979c07e5a..68ec3f5e755

[PATCH v7 02/49] include/system/hvf: missing vaddr include

2025-05-07 Thread Pierrick Bouvier
On MacOS x86_64: In file included from ../target/i386/hvf/x86_task.c:13: /Users/runner/work/qemu/qemu/include/system/hvf.h:42:5: error: unknown type name 'vaddr' vaddr pc; ^ /Users/runner/work/qemu/qemu/include/system/hvf.h:43:5: error: unknown type name 'vaddr' vaddr saved_insn;

[PATCH v7 20/49] target/arm/helper: restrict include to common helpers

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 360e6ac0f59..941fc35d24d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -12

[PATCH v7 39/49] target/arm/machine: compile file once (system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index bb1c09676d5..b404fa54863 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.

[PATCH v7 16/49] target/arm/helper: extract common helpers

2025-05-07 Thread Pierrick Bouvier
Allow later commits to include only the "new" tcg/helper.h, thus preventing to pull aarch64 helpers (+ target/arm/helper.h contains a ifdef TARGET_AARCH64). Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/helper.h | 1152 +-

[PATCH v7 22/49] target/arm/helper: expose aarch64 cpu registration

2025-05-07 Thread Pierrick Bouvier
associated define_arm_cp_regs are guarded by "cpu_isar_feature(aa64_*)", so it's safe to expose that code for arm target (32 bit). Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/helper.c | 7 --- 1 file changed, 7 deletions

[PATCH v7 34/49] target/arm/kvm-stub: compile file once (system)

2025-05-07 Thread Pierrick Bouvier
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index 29a36fb3c5e..bb1c09676d5 100644 --- a/target/

[PATCH v7 01/49] target/arm: Replace target_ulong -> vaddr for HWBreakpoint

2025-05-07 Thread Pierrick Bouvier
From: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- target/arm/internals.h | 6 +++--- target/arm/hyp_gdbstub.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH v7 00/49] single-binary: compile target/arm twice

2025-05-07 Thread Pierrick Bouvier
More work toward single-binary. Some files have external dependencies for the single-binary: - target/arm/gdbstub.c: gdbhelpers - target/arm/arm-qmp-cmds.c: qapi - target/arm/tcg/translate*: need deep cleanup in include/tcg - target/arm/tcg/cpu*: need TargetInfo implemented for arm/aarch64 - targe

[PATCH v7 36/49] target/arm/machine: remove TARGET_AARCH64 from migration state

2025-05-07 Thread Pierrick Bouvier
This exposes two new subsections for arm: vmstate_sve and vmstate_za. Those sections have a ".needed" callback, which already allow to skip them when not needed. vmstate_sve .needed is checking cpu_isar_feature(aa64_sve, cpu). vmstate_za .needed is checking ZA flag in cpu->env.svcr. Reviewed-by:

[PATCH v7 09/49] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common

2025-05-07 Thread Pierrick Bouvier
Call is guarded by is_a64(env), so it's safe to expose without needing to assert anything. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/cpu.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index b0eb02c88ba..b

Re: [PATCH 00/13] single-binary: make QAPI generated files common

2025-05-07 Thread Pierrick Bouvier
For people who would be interested to try this series, I used attached script. $ ./qmp_schema.sh ./build/qemu-system-x86_64 -M none > x86_64 $ ./qmp_schema.sh ./build/qemu-system-s390x -M none > s390x $ vimdiff x86_64 s390x diff --git a/qmp_schema.sh b/qmp_schema.sh new file mode 100755 in

[PATCH 05/13] qapi/commands: register commands conditionally

2025-05-07 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- scripts/qapi/commands.py | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py index 79142273828..7b172f7c081 100644 --- a/scripts/qapi/commands.py +++ b/scripts/qapi/commands.py @@ -27,6

[PATCH 10/13] qapi: add weak stubs for target specific commands

2025-05-07 Thread Pierrick Bouvier
We are about to expose various target specific commands for all targets, so we need to stub not implemented qmp_* functions. MinGW does not support weak symbols without at least one strong definition, so we'll have to detail stubs per target. Sad. Signed-off-by: Pierrick Bouvier --- qapi/comman

Re: [RFC PATCH 0/3] single-binary: make QAPI generated files common

2025-05-07 Thread Pierrick Bouvier
v1 was posted: https://lore.kernel.org/qemu-devel/20250507231442.879619-1-pierrick.bouv...@linaro.org/ Regards, Pierrick

[PATCH 06/13] qapi/visit: hide fields in JSON marshalling

2025-05-07 Thread Pierrick Bouvier
We modify gen_visit_object_members to hide elements based on the specified conditional. This allows to hide those elements in input/output json, even though they still exist in C code. Signed-off-by: Pierrick Bouvier --- scripts/qapi/visit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH 09/13] qapi: transform target specific 'if' in runtime checks

2025-05-07 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- qapi/machine-target.json | 84 qapi/misc-target.json| 48 --- scripts/qapi/expr.py | 9 +++-- 3 files changed, 81 insertions(+), 60 deletions(-) diff --git a/qapi/machine-target.json b/qapi/

[PATCH 07/13] qapi: add access to qemu/target-info.h

2025-05-07 Thread Pierrick Bouvier
Add a default include qemu/target-info.h in QAPI generated code. This allows runtime conditionals to use any function defined in this header. Signed-off-by: Pierrick Bouvier --- scripts/qapi/commands.py | 2 ++ scripts/qapi/introspect.py | 1 + scripts/qapi/visit.py | 2 ++ 3 files change

[PATCH 11/13] qapi: make all generated files common

2025-05-07 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- qapi/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/meson.build b/qapi/meson.build index 60fc958ec10..b8aa33ec9db 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -144,7 +144,7 @@ foreach output : qapi_specific_outpu

[PATCH 02/13] qapi/introspect: generate schema as a QObject directly

2025-05-07 Thread Pierrick Bouvier
Instead of defining a const QLitObject, we implement a function to directly return the QObject associated. The benefit is that we can now have a non static definition for the QLitObject, and so we can assign it using non static initializer. This will be used in next commits to initialize a .hidden

[PATCH 13/13] [ANNEX] build/qapi: after series

2025-05-07 Thread Pierrick Bouvier
In this patch, you can see all the changes in generated QAPI code. Feel free to review inline if you want to highlight some parts. Signed-off-by: Pierrick Bouvier --- build/qapi/qapi-commands-machine-target.h | 12 - build/qapi/qapi-commands-misc-target.h| 22 -- build/qapi/qapi-events-mac

[PATCH 04/13] qapi/introspect: hide fields in schema

2025-05-07 Thread Pierrick Bouvier
We know have a way to parse runtime conditionals in QAPI json, and hide qlit elements at runtime. So we can combine both to hide elements in our schema based on a conditional specified in json. Signed-off-by: Pierrick Bouvier --- scripts/qapi/introspect.py | 28 +++- scri

[PATCH 01/13] qapi: introduce 'runtime_if' for QAPI json

2025-05-07 Thread Pierrick Bouvier
This new entry can be used in QAPI json to specify a runtime conditional to expose any entry, similar to existing 'if', that applies at compile time, thanks to ifdef. The element is always defined in C, but not exposed through the schema and visit functions, thus being hidden for a QMP consumer. Q

[PATCH 08/13] qemu/target-info: implement missing helpers

2025-05-07 Thread Pierrick Bouvier
Add runtime helpers for target and config queries. Note: This will be reimplemented later [1] using proper information in TargetInfo. Meanwhile, just add a simple implementation. [1] https://patchew.org/QEMU/20250424222112.36194-1-phi...@linaro.org/20250424222112.36194-19-phi...@linaro.org/ Sig

[PATCH 00/13] single-binary: make QAPI generated files common

2025-05-07 Thread Pierrick Bouvier
This series compiles QAPI generated once, while keeping the same schema and commands exposed to the QAPI consumer. Steps: - Introduce a new json entry, named 'runtime_if' (name is not definitive, see patch 1), to allow dynamic check about exposing a given entry/command or not. - Conditionally e

  1   2   3   >