[PATCH v4 37/40] target/arm/machine: remove TARGET_AARCH64 from migration state

2025-05-03 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. Signed-off-by

[PATCH v4 11/40] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features

2025-05-03 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 v4 25/40] target/arm/helper: compile file twice (user, system)

2025-05-03 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 v4 10/40] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common

2025-05-03 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 37b11e8866f..0

[PATCH v4 04/40] meson: apply target config for picking files from libsystem and libuser

2025-05-03 Thread Pierrick Bouvier
semihosting code needs to be included only if CONFIG_SEMIHOSTING is set. However, this is a target configuration, so we need to apply it to the libsystem libuser source sets. Signed-off-by: Pierrick Bouvier --- meson.build | 26 ++ 1 file changed, 14 insertions(+), 12 del

[PATCH v4 06/40] target/arm/kvm-stub: add kvm_arm_reset_vcpu stub

2025-05-03 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 v4 35/40] target/arm/kvm-stub: compile file once (system)

2025-05-03 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 v4 38/40] target/arm/machine: move cpu_post_load kvm bits to kvm_arm_cpu_post_load function

2025-05-03 Thread Pierrick Bouvier
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 d156c790b66..00fc82db711 100644 --- a/

[PATCH v4 40/40] target/arm/machine: compile file once (system)

2025-05-03 Thread Pierrick Bouvier
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.build @@ -13,7 +13,6 @@ arm_syst

[PATCH v4 32/40] target/arm/ptw: replace TARGET_AARCH64 by CONFIG_ATOMIC64 from arm_casq_ptw

2025-05-03 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). Signed-off-by: Pierrick Bouvier --- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/ptw.c

[PATCH v4 13/40] target/arm/cpu32-stubs.c: compile file twice (user, system)

2025-05-03 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 v4 03/40] meson: add common libs for target and target_system

2025-05-03 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 v4 36/40] target/arm/machine: reduce migration include to avoid target specific definitions

2025-05-03 Thread Pierrick Bouvier
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 @@ -6,7 +6,8 @@ #include "kvm_arm

[PATCH v4 30/40] target/arm/cortex-regs: compile file once (system)

2025-05-03 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.

Re: [PATCH v4 04/40] meson: apply target config for picking files from libsystem and libuser

2025-05-03 Thread Pierrick Bouvier
On 5/3/25 10:28 PM, Pierrick Bouvier wrote: semihosting code needs to be included only if CONFIG_SEMIHOSTING is set. However, this is a target configuration, so we need to apply it to the libsystem libuser source sets. Signed-off-by: Pierrick Bouvier --- meson.build | 26 ++---

[PATCH v4 29/40] target/arm/arm-powerctl: compile file once (system)

2025-05-03 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 v4 02/40] include/system/hvf: missing vaddr include

2025-05-03 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 v4 20/40] target/arm/debug_helper: compile file twice (user, system)

2025-05-03 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 v4 34/40] target/arm/meson: accelerator files are not needed in user mode

2025-05-03 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 v4 19/40] target/arm/debug_helper: remove target_ulong

2025-05-03 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 357bc2141ae..50ef5618f51 100644 --- a/

[PATCH v4 07/40] target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c

2025-05-03 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 v4 01/40] target/arm: Replace target_ulong -> uint64_t for HWBreakpoint

2025-05-03 Thread Pierrick Bouvier
From: Philippe Mathieu-Daudé CPUARMState::pc is of type uint64_t. 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 ins

[PATCH v4 12/40] target/arm/cpu: compile file twice (user, system) only

2025-05-03 Thread Pierrick Bouvier
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/meson.build @@ -1,6 +1,6 @@ ar

[PATCH v4 31/40] target/arm/ptw: replace target_ulong with int64_t

2025-05-03 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 d0a53d0987f..424d1b54275

[PATCH v4 33/40] target/arm/ptw: compile file once (system)

2025-05-03 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 v4 24/40] target/arm/helper: remove remaining TARGET_AARCH64

2025-05-03 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 | 8 1 file changed, 8 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 1db40ca

[PATCH v4 14/40] tcg: add vaddr type for helpers

2025-05-03 Thread Pierrick Bouvier
Defined as an alias of i32/i64 depending on host pointer size. Signed-off-by: Pierrick Bouvier --- include/tcg/tcg-op-common.h| 1 + include/tcg/tcg.h | 17 + include/exec/helper-head.h.inc | 11 +++ tcg/tcg.c | 6 ++ 4 files ch

[PATCH v4 22/40] target/arm/helper: replace target_ulong by vaddr

2025-05-03 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 085c1656027..595d9334977 100644 --- a/target/arm/helper.

[PATCH v4 15/40] target/arm/helper: use vaddr instead of target_ulong for exception_pc_alignment

2025-05-03 Thread Pierrick Bouvier
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/helper.h b/target/arm/helper.h

[PATCH v4 39/40] target/arm/kvm-stub: add missing stubs

2025-05-03 Thread Pierrick Bouvier
Those become needed once kvm_enabled can't be known at compile time. 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..34e57fab011 100644 --- a/target/arm/kvm-

[PATCH v4 17/40] target/arm/helper: extract common helpers

2025-05-03 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 v4 18/40] target/arm/debug_helper: only include common helpers

2025-05-03 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 473ee2af38e..357b

[PATCH v4 27/40] target/arm/arch_dump: remove TARGET_AARCH64 conditionals

2025-05-03 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 v4 28/40] target/arm/arch_dump: compile file once (system)

2025-05-03 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 v4 08/40] accel/hvf: add hvf_enabled() for common code

2025-05-03 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 v4 09/40] target/arm/cpu: remove TARGET_BIG_ENDIAN dependency

2025-05-03 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 07f279fec8c..37b11e8866f 100644 --- a/target/arm/cpu.c +++ b/target/ar

[PATCH v4 26/40] target/arm/vfp_fpscr: compile file twice (user, system)

2025-05-03 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 v4 16/40] target/arm/helper: use vaddr instead of target_ulong for probe_access

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

[PATCH v4 05/40] target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h

2025-05-03 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 v4 21/40] target/arm/helper: restrict include to common helpers

2025-05-03 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 257b1ba5270..085c1656027 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -12

[PATCH v4 00/40] single-binary: compile target/arm twice

2025-05-03 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 They will not be ported in this series. Built on {linux, windows, macos} x {x86_64, aarch64} Fully tested on linux-x86_64 v1 -- - tar

[PATCH v4 23/40] target/arm/helper: expose aarch64 cpu registration

2025-05-03 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

Re: [PATCH v3 30/33] target/arm/ptw: remove TARGET_AARCH64 from arm_casq_ptw

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 9:24 AM, Richard Henderson wrote: Are we still able to build qemu-system-arm on a 32-bit host with these changes? It may be tricky to check, because the two easiest 32-bit hosts (i686, armv7) also happen to have a 64-bit cmpxchg. I think "make docker-test-build@debian-mipsel-cross"

Re: [PATCH v3 30/33] target/arm/ptw: remove TARGET_AARCH64 from arm_casq_ptw

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 9:24 AM, Richard Henderson wrote: On 4/30/25 23:23, Pierrick Bouvier wrote: Signed-off-by: Pierrick Bouvier --- target/arm/ptw.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 424d1b54275..f428c9b9267 10

Re: [PATCH v3 25/33] target/arm/arch_dump: remove TARGET_AARCH64 conditionals

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 12:30 PM, Philippe Mathieu-Daudé wrote: On 1/5/25 08:23, Pierrick Bouvier wrote: Associated code is protected by cpu_isar_feature(aa64*) Signed-off-by: Pierrick Bouvier --- target/arm/arch_dump.c | 6 -- 1 file changed, 6 deletions(-) Should we assert() in the callees? Any

Re: [PATCH v3 29/33] target/arm/ptw: replace target_ulong with uint64_t

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 12:35 PM, Philippe Mathieu-Daudé wrote: On 1/5/25 08:23, Pierrick Bouvier wrote: 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 d0a53d0987f..424d1b54275 100644

Re: [PATCH v3 20/33] target/arm/helper: replace target_ulong by vaddr

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 12:28 PM, Philippe Mathieu-Daudé wrote: On 1/5/25 08:23, Pierrick Bouvier wrote: 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 085c1656027..595d9334977 10

Re: [PATCH v3 17/33] target/arm/debug_helper: remove target_ulong

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 12:28 PM, Philippe Mathieu-Daudé wrote: On 1/5/25 17:07, Richard Henderson wrote: On 4/30/25 23:23, Pierrick Bouvier wrote: 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

Re: [PATCH v3 15/33] target/arm/helper: extract common helpers

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 8:24 AM, Pierrick Bouvier wrote: On 5/1/25 8:06 AM, Richard Henderson wrote: On 4/30/25 23:23, Pierrick Bouvier wrote: Signed-off-by: Pierrick Bouvier --- target/arm/helper.h | 1152 +- target/arm/tcg/helper.h | 1153 +

Re: [PATCH v3 13/33] target/arm/helper: use i64 for exception_pc_alignment

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 9:30 AM, Richard Henderson wrote: On 4/30/25 23:23, Pierrick Bouvier wrote: --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -49,7 +49,7 @@ DEF_HELPER_3(exception_with_syndrome, noreturn, env, i32, i32) DEF_HELPER_4(exception_with_syndrome_el, noreturn, env, i32, i32, i32)

[PATCH] target/sh4: Use MO_ALIGN for system UNALIGN()

2025-05-03 Thread Richard Henderson
This should have been done before removing TARGET_ALIGNED_ONLY, as we did for hppa and alpha. Fixes: 8244189419f9 ("target/sh4: Remove TARGET_ALIGNED_ONLY") Signed-off-by: Richard Henderson --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/

Re: [PATCH v3 09/33] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 12:06 PM, Philippe Mathieu-Daudé wrote: Missing the "Why?". Answer, because it is guarded by is_a64(). We are guaranteed it was not used because the whole definition is under TARGET_AARCH64 (and not only the code inside the function). If it was called before, out of this target, it

Re: [PATCH v3 06/33] target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 12:04 PM, Philippe Mathieu-Daudé wrote: (why?) Allow to get rid of CONFIG_KVM in target/arm/cpu.c. I'll update description with it. On 1/5/25 08:23, Pierrick Bouvier wrote: Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- target/arm/kvm_arm.h | 2 ++ ta

Re: [PATCH 1/2] semihosting/uaccess: Remove uses of target_ulong type

2025-05-03 Thread Pierrick Bouvier
On 5/2/25 3:05 PM, Philippe Mathieu-Daudé wrote: Replace target_ulong by vaddr or size_t types to match cpu_memory_rw_debug() prototype in "exec/cpu-common.h": int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, void *ptr, size_t len, bool

Re: [PATCH 2/2] semihosting/uaccess: Compile once

2025-05-03 Thread Pierrick Bouvier
On 5/2/25 3:05 PM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- semihosting/meson.build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/semihosting/meson.build b/semihosting/meson.build index f3d38dda91d..a0a1c081f43 100644 --- a/semihosting/m

[PATCH] meson: use thorough test setup as default

2025-05-03 Thread Pierrick Bouvier
Allows all tests to be visible by default when using meson test directly. This has no impact on make check-* commands, which use SPEED=quick by default (see scripts/mtest2make.py). Signed-off-by: Pierrick Bouvier --- meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff -

Re: Functional tests precache behaviour

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 2:26 PM, Pierrick Bouvier wrote: On 5/1/25 10:56 AM, Peter Maydell wrote: On Wed, 30 Apr 2025 at 17:41, Daniel P. Berrangé wrote: FWIW, if you want to run a specific test, personally don't use meson or make, as you can just invoke the file directly: $ QEMU_TEST_QEMU_BINARY=./buil

Re: [RFC PATCH v5 08/21] hw/arm: Add DEFINE_MACHINE_[ARM_]AARCH64() macros

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 4:35 PM, BALATON Zoltan wrote: On Mon, 28 Apr 2025, Pierrick Bouvier wrote: On 4/28/25 6:10 PM, BALATON Zoltan wrote: On Mon, 28 Apr 2025, Pierrick Bouvier wrote: On 4/28/25 11:44 AM, BALATON Zoltan wrote: On Mon, 28 Apr 2025, Pierrick Bouvier wrote: On 4/28/25 3:31 AM, BALATON Zol

Re: [PATCH] docs: Don't define duplicate label in qemu-block-drivers.rst.inc

2025-05-03 Thread Pierrick Bouvier
On 5/1/25 2:31 AM, Peter Maydell wrote: Sphinx requires that labels within documents are unique across the whole manual. This is because the "create a hyperlink" directive specifies only the name of the label, not a filename+label. Some Sphinx versions will warn about duplicate labels, but even

Re: [PATCH 2/4] target/i386/emulate: stop overloading decode->op[N].ptr

2025-05-03 Thread BALATON Zoltan
On Fri, 2 May 2025, Paolo Bonzini wrote: decode->op[N].ptr can contain either a host pointer (!) in CPUState or a guest virtual address. Pass the whole struct to read_val_ext and write_val_ext, so that it can decide the contents based on the operand type. Signed-off-by: Paolo Bonzini --- targe

[PULL 08/13] target/i386/hvf: fix a compilation error

2025-05-03 Thread Paolo Bonzini
From: Wei Liu Include exec/target_page.h to fix the following build error. x86_64-softmmu.a.p/target_i386_hvf_hvf.c.o -c ../target/i386/hvf/hvf.c ../target/i386/hvf/hvf.c:139:49: error: use of undeclared identifier 'TARGET_PAGE_SIZE' 139 | uint64_t dirty_page_start = gpa & ~(TARGE

[PULL 03/13] rust: assertions: Support index field wrapped in BqlCell

2025-05-03 Thread Paolo Bonzini
Currently, if the `num` field of a varray is not a numeric type, such as being placed in a wrapper, the array variant of assert_field_type will fail the check. HPET currently wraps num_timers in BqlCell<>. Although BqlCell<> is not necessary from strictly speaking, it makes sense for vmstate to re

[PULL 07/13] target/i386/emulate: remove rflags leftovers

2025-05-03 Thread Paolo Bonzini
From: Magnus Kulke Fixes: c901905ea670 ("target/i386/emulate: remove flags_mask") In c901905ea670 rflags have been removed from `x86_decode`, but there were some leftovers. Signed-off-by: Magnus Kulke Link: https://lore.kernel.org/r/20250429093319.5010-1-magnusku...@linux.microsoft.com Signed

[PULL 06/13] rust/hpet: Support migration

2025-05-03 Thread Paolo Bonzini
From: Zhao Liu Based on commit 1433e38cc8 ("hpet: do not overwrite properties on post_load"), add the basic migration support to Rust HPET. The current migration implementation introduces multiple unsafe callbacks. Before the vmstate builder, one possible cleanup approach is to wrap callbacks in

[PULL 05/13] rust/timer: Define NANOSECONDS_PER_SECOND binding as u64

2025-05-03 Thread Paolo Bonzini
From: Zhao Liu NANOSECONDS_PER_SECOND is often used in operations with get_ns(), which currently returns a u64. Therefore, define a new NANOSECONDS_PER_SECOND binding is with u64 type to eliminate unnecessary type conversions (from u32 to u64). Signed-off-by: Zhao Liu Link: https://lore.kernel

[PULL 13/13] monitor: don't wake up qmp_dispatcher_co coroutine upon cleanup

2025-05-03 Thread Paolo Bonzini
From: Andrey Drobyshev Since the commit 3e6bed61 ("monitor: cleanup detection of qmp_dispatcher_co shutting down"), coroutine pointer qmp_dispatcher_co is set to NULL upon cleanup. If a QMP command is sent after monitor_cleanup() (e.g. after shutdown), this may lead to SEGFAULT on aio_co_wake(NU

[PULL 02/13] vmstate: support varray for vmstate_clock!

2025-05-03 Thread Paolo Bonzini
Make vmstate_struct and vmstate_clock more similar; they are basically the same thing, except for the clock case having a built-in VMStateDescription. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/vmstate.rs | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/

[PULL 11/13] hw/char/serial: Remove unused prog_if compat property

2025-05-03 Thread Paolo Bonzini
From: BALATON Zoltan This property was added to preserve previous value when this was fixed in version 2.1 but the last machine using it was already removed when adding diva-gsp leaving this property unused and unnecessary. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Revi

[PULL 10/13] target/i386: do not block singlestep for STI

2025-05-03 Thread Paolo Bonzini
STI will trigger a singlestep exception even if it has inhibit-IRQ behavior. Do not suppress single-step for all IRQ-inhibiting instructions, instead special case MOV SS and POP SS. Cc: qemu-sta...@nongnu.org Fixes: f0f0136abba ("target/i386: no single-step exception after MOV or POP SS", 2024-0

[PULL 04/13] rust/vmstate_test: Test varray with num field wrapped in BqlCell

2025-05-03 Thread Paolo Bonzini
From: Zhao Liu Signed-off-by: Zhao Liu Link: https://lore.kernel.org/r/20250414144943.1112885-4-zhao1@intel.com Signed-off-by: Paolo Bonzini --- rust/qemu-api/tests/vmstate_tests.rs | 41 ++-- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/rust/qemu-

[PULL 09/13] target/i386: do not trigger IRQ shadow for LSS

2025-05-03 Thread Paolo Bonzini
Because LSS need not trigger an IRQ shadow, gen_movl_seg can't just use the destination register to decide whether to inhibit IRQs. Add an argument. Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 27 --- target/i386/tcg/emit.c.i

[PULL 12/13] rust: centralize config in workspace root

2025-05-03 Thread Paolo Bonzini
From: Stefan Zabka This commit bundles common config option in the workspace root and applies them through .workspace = true Signed-off-by: Stefan Zabka Link: https://lore.kernel.org/r/20250502212748.124953-1-...@zabka.it Signed-off-by: Paolo Bonzini --- rust/Cargo.toml | 7 +

[PULL 00/13] Rust, i386 changes for 2025-05-03

2025-05-03 Thread Paolo Bonzini
The following changes since commit 5134cf9b5d3aee4475fe7e1c1c11b093731073cf: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2025-04-30 13:34:44 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

[PULL 01/13] rust/vmstate: Add support for field_exists checks

2025-05-03 Thread Paolo Bonzini
From: Zhao Liu Unfortunately, at present it's not possible to have a const "with_exist_check" method to append test_fn after vmstate_struct (due to error on "constant functions cannot evaluate destructors" for `F`). Before the vmstate builder, the only way to support "test_fn" is to extend vmsta

Re: [CFT PATCH 0/4] target/i386/emulate: cleanups

2025-05-03 Thread Paolo Bonzini
Il sab 3 mag 2025, 07:39 Wei Liu ha scritto: > FWIW this series builds fine on for x86 HVF. > Thanks, can you also test it on either HVF or Hyper-V? Paolo Thanks, > Wei. > > > > > Paolo Bonzini (4): > > target/i386/emulate: fix target_ulong format strings > > target/i386/emulate: stop over