Re: [RFC PATCH v2 26/48] accel/system: Document cpu_synchronize_state_post_init/reset()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/system/accel-ops.h | 8 1 file changed, 8 insertions(+) diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h index f40098c1c92..b1b9dce27d0 100644 --- a/include/system/a

[PATCH v2 009/101] tcg: Split out tcg_gen_gvec_dup_imm_var

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/tcg/tcg-op-gvec-common.h | 3 +++ tcg/tcg-op-gvec.c| 10 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/tcg/tcg-op-gvec-common.h b/include/tcg/tcg-op-gvec-common.h index fbe5a68a7e..7cc998cdfd 100644

Re: [PATCH v2 24/26] tests/functional: Require TCG to run Aarch64 imx8mp-evk test

2025-06-21 Thread Richard Henderson
On 6/20/25 06:07, Philippe Mathieu-Daudé wrote: The imx8mp-evk machine is only built when TCG is available. Signed-off-by: Philippe Mathieu-Daudé --- tests/functional/test_aarch64_imx8mp_evk.py | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [RFC PATCH RESEND 19/42] accel/split: Implement kick_vcpu_thread()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 746a6a2782d..63b6217f3fa 10064

Re: [PATCH v2 12/26] target/arm: Restrict system register properties to system binary

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Do not expose the following system-specific properties on user-mode binaries: - psci-conduit - cntfrq (ARM_FEATURE_GENERIC_TIMER) - rvbar (ARM_FEATURE_V8) - has-mpu (ARM_FEATURE_PMSA) - pmsav7-dregion (ARM_FEATURE_PMSA) - reset-cbar (AR

Re: [RFC PATCH v2 36/48] accel/whpx: Convert to AccelOpsClass::cpu_thread_routine

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/whpx/whpx-accel-ops.c | 12 +--- 1 file changed, 1 insertion(+)

Re: [RFC PATCH RESEND 38/42] accel/tcg: Introduce TCGCPUOps::rebuild_tb_hflags handler

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: index 29ebcf45928..20999033c89 100644 --- a/include/system/accel-ops.h +++ b/include/system/accel-ops.h @@ -71,6 +71,14 @@ struct AccelOpsClass { void (*synchronize_pre_loadvm)(CPUState *cpu); void (*synchronize_pre_resume)(bool step_pen

[PATCH v2 026/101] target/arm: Implement SME2 BMOPA

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/helper-sme.h| 3 +++ target/arm/tcg/sme_helper.c| 34 -- target/arm/tcg/translate-sme.c | 2 ++ target/arm/tcg/sme.decode | 2 ++ 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/ta

Re: FreeBSD 14.1 aarch64 iso URL is down

2025-06-21 Thread Warner Losh
On Sat, Jun 21, 2025, 6:01 PM Stefan Hajnoczi wrote: > On Sat, Jun 21, 2025 at 7:59 PM Stefan Hajnoczi > wrote: > > (I forgot to CC qemu-devel) > > > > > Hi, > > This might only be temporary, but the CI is getting HTTP 404 Not Found > > for the following URL: > > > https://download.freebsd.org/r

Re: [RFC PATCH RESEND 21/42] accel/split: Set use_hw in cpu_thread_routine() and switch over

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Introduce the EXCP_HWACCEL definition to switch to hardware accelerator. Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel.h | 1 + include/exec/cpu-common.h | 1 + accel/split/split-accel-ops.c | 11 +++ 3 f

Re: [RFC PATCH v2 36/48] accel/whpx: Convert to AccelOpsClass::cpu_thread_routine

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: By converting toAccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/whpx/whpx-accel-ops.c | 12 +--- 1 file changed, 1 insertion(+),

Re: [RFC PATCH RESEND 09/42] accel/split: Add cpu_thread_routine() stub

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 70 ++- 1 file changed, 69 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~ diff --git a/accel/split/split-accel-ops.c

Re: [RFC PATCH v2 13/48] accel: Move cpu_common_[un]realize() declarations to AccelOpsClass

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: AccelClass is for methods dealing with AccelState. When dealing with vCPUs, we want AccelOpsClass. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 2 -- include/system/accel-ops.h | 2 ++ accel/accel-common.c | 10

Re: [RFC PATCH RESEND 26/42] accel/split: Empty set/get_virtual_clock()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 12 1 file changed, 12 deletions(-) Reviewed-by: Richard Henderson r~

Re: [RFC PATCH RESEND 40/42] accel/split: Call TCGCPUOps::rebuild_tb_hflags()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Call TCG rebuild_tb_hflags() when transitioning from hardware accelerator to TCG. Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accel/split/split-accel-ops.c b/acc

Re: [RFC PATCH RESEND 41/42] tests/functional: Add split_available() helper

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: +return 'split' in list_accel(qemu_bin) \ + and tcg_available(qemu_bin) \ + and hvf_available(qemu_bin) Do you really need 3 checks? Kconfig gates on this already. r~

Re: [RFC PATCH RESEND 33/42] accel/split: Implement update_guest_debug()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index eb52d690c7c..d59e70e0d9b

Re: [RFC PATCH RESEND 36/42] target/arm: Have ERET switch to hw accel for EL0/EL1

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: When hardware accelerator available, use it to directly run EL0 and EL1. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/tcg/helper-a64.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target/arm/tcg/helper-a64.c b/target/arm

Re: [RFC PATCH RESEND 37/42] accel/hvf: Emulate HVC at EL2

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- target/arm/hvf/hvf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 3907ea8791e..a4f823f834d 100644 --- a/target/arm/hvf/hvf.c +++ b/target/ar

Re: [RFC PATCH RESEND 35/42] target/arm: Emulate EL2 under TCG

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: When using hardware acceleration and TCG is available, expose EL2 and EL3 features as available (they will be emulated). Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu64.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

[PATCH v2 055/101] target/arm: Implement SME2 FRINTN, FRINTP, FRINTM, FRINTA

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/translate-sme.c | 9 + target/arm/tcg/sme.decode | 9 + 2 files changed, 18 insertions(+) diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c index 733b7a0743..a96d5ace43 100644 --- a/target/arm/tcg

Re: [RFC PATCH RESEND 34/42] accel/split: Implement get_[vcpu]_stats()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel.h | 5 + accel/split/split-accel-ops.c | 24 +++- accel/split/split-all.c | 16 +++- 3 files changed, 43 insertions(+), 2 deletion

Re: [RFC PATCH RESEND 32/42] accel/split: Implement insert_breakpoint()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 40cd39aea5c..eb52d690c7

Re: [RFC PATCH RESEND 30/42] accel/split: Implement remove_all_breakpoints()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index e1d91ace2fa..0f3d48fc68d

Re: [RFC PATCH v2 30/48] accel: Introduce AccelOpsClass::cpu_thread_routine handler

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: In order to have a generic function creating threads, introduce the thread_precreate() and cpu_thread_routine() handlers. Signed-off-by: Philippe Mathieu-Daudé --- include/system/accel-ops.h | 5 - accel/accel-common.c | 16 +

Re: [RFC PATCH RESEND 28/42] accel/split: Empty cpu_thread_is_idle()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 6 -- 1 file changed, 6 deletions(-) Why does this not defer to the current sub-accel? r~ diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-op

Re: [RFC PATCH RESEND 27/42] accel/split: Empty get_elapsed_ticks()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index d19b4641a2e..034b5ebc96c 100644 --- a/accel/spl

Re: [RFC PATCH RESEND 24/42] accel/split: Implement handle_interrupt()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 399bf71a9ec..5a36e22f205 10

Re: [RFC PATCH RESEND 23/42] target/arm: Implement SysemuCPUOps::can_accelerate() handler

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: ARM hardware can only accelerate EL0 and EL1. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 8 1 file changed, 8 insertions(+) Reviewed-by: Richard Henderson r~

Re: [RFC PATCH RESEND 25/42] accel/split: Empty ops_init()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 5a36e22f205..375821f1064 100644 --- a/accel/spli

[PATCH v2 094/101] target/arm: Move ld1qq and st1qq primitives to sve_ldst_internal.h

2025-06-21 Thread Richard Henderson
Move from sme_helper.c to the shared header. Add a comment noting the lack of atomicity. Signed-off-by: Richard Henderson --- target/arm/tcg/sve_ldst_internal.h | 63 ++ target/arm/tcg/sme_helper.c| 44 +++-- 2 files changed, 69 insertions(+),

Re: [RFC PATCH RESEND 20/42] accel/split: Implement cpu_common_realize()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 63b6217f3fa..3278e01f18a 10

Re: [RFC PATCH v2 38/48] accel/whpx: Expose whpx_enabled() to common code

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Currently whpx_enabled() is restricted to target-specific code. By defining CONFIG_WHPX_IS_POSSIBLE we allow its use anywhere. Signed-off-by: Philippe Mathieu-Daudé --- include/system/whpx.h | 27 ++- accel/stubs/wh

Re: [RFC PATCH RESEND 03/42] accel/split: Implement cpus_are_resettable()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-all.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/accel/split/split-all.c b/accel/split/split-all.c index 6bc95c7a7c8..c86d0e8583a 100644 --- a/acc

Re: [RFC PATCH RESEND 16/42] accel/split: Implement synchronize_state()

2025-06-21 Thread Richard Henderson
On 6/21/25 19:52, Richard Henderson wrote: On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   accel/split/split-accel-ops.c | 11 ++-   1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split

Re: [RFC PATCH RESEND 16/42] accel/split: Implement synchronize_state()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 65feb929404..80efbd82091

Re: [RFC PATCH RESEND 15/42] accel/split: Implement synchronize_pre_resume()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 6b3ddf21a17..65feb929404

Re: [RFC PATCH RESEND 14/42] accel/split: Implement synchronize_post_init()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index d4fa07c2dec..6b3ddf21a17

Re: [RFC PATCH v2 16/48] accel/tcg: Factor tcg_dump_flush_info() out

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 2 ++ accel/tcg/monitor.c | 27 +-- 2 files changed, 19 insertions(+), 10 deletions(-) Reviewed-by: Richard Henderson r~

Re: [RFC PATCH v2 29/48] accel: Factor accel_create_vcpu_thread() out

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Factor accel_create_vcpu_thread() out of system/cpus.c to be able to access accel/ internal definitions. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 2 ++ accel/accel-common.c | 19 +++ system/cpus.c

Re: [RFC PATCH RESEND 13/42] accel/split: Implement cpu_reset_hold()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~ diff --git a/accel/split/split-accel-ops.c b/accel/split/split-ac

Re: [RFC PATCH RESEND 12/42] accel/split: Have thread routine ready to dispatch over HW/SW

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: @@ -49,10 +56,12 @@ static void *split_cpu_thread_routine(void *arg) cpu->exit_request = 1; do { -r = 0; - if (cpu_can_run(cpu)) { -r = 0; /* TODO: exec_vcpu_thread() */ +if (acs->use_hw) { +

Re: [RFC PATCH RESEND 10/42] accel/split: Define and allocate AccelCPUState

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: AccelCPUState is where we store per-vCPU accelerator related information. FIXME: structures might clash so add padding (ok with TCG+HVF) Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel.h | 7 +++ accel/split/split-acc

Re: [RFC PATCH RESEND 04/42] accel/split: Implement accel_init_machine()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Force to TCG + HVF for now. Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel.h | 3 +++ accel/split/split-all.c | 30 +- 2 files changed, 32 insertions(+), 1 deletion(-) Reviewed-by: Richard Hen

Re: [RFC PATCH RESEND 04/42] accel/split: Implement accel_init_machine()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: +static void split_accel_instance_init(Object *obj) +{ +SplitAccelState *sas = SPLIT_ACCEL(obj); + +sas->sw_name = g_strdup("tcg"); +sas->hw_name = g_strdup("hvf"); There's no real need to strdup. r~

Re: [RFC PATCH RESEND 11/42] accel/split: Register MTTCG

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: FIXME: Use sw-hooks? I'm OK with hard-coding tcg for sw, especially for now. Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 5 + 1 file changed, 5 insertions(+) Reviewed-by: Richard Henderson r~

Re: [RFC PATCH v2 05/48] accel/kvm: Reduce kvm_create_vcpu() declaration scope

2025-06-21 Thread Richard Henderson
On 6/20/25 10:12, Philippe Mathieu-Daudé wrote: kvm_create_vcpu() is only used within the same file unit. Signed-off-by: Philippe Mathieu-Daudé --- include/system/kvm.h | 8 accel/kvm/kvm-all.c | 8 +++- 2 files changed, 7 insertions(+), 9 deletions(-) Reviewed-by: Richard He

Re: [RFC PATCH RESEND 08/42] accel/split: Implement gdbstub_supported_sstep_flags()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-all.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/accel/split/split-all.c b/accel/split/split-all.c index cb910300931..413954af96c 100644 --- a/ac

Re: [RFC PATCH RESEND 07/42] accel/split: Implement supports_guest_debug()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-all.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/accel/split/split-all.c b/accel/split/split-all.c index 8b9f8ff77a4..cb910300931 100644 --- a/acc

Re: [RFC PATCH RESEND 06/42] accel/split: Empty setup_post()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-all.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/accel/split/split-all.c b/accel/split/split-all.c index 28f626d0ff4..8b9f8ff77a4 100644 --- a/accel/split/split-all.c +++

Re: [RFC PATCH RESEND 05/42] accel/split: Expose 'hw' and 'sw' properties

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: In preparation of other accelerator (or potential emulator), expose the "hw" and "sw" keys. Only HVF and TCG allowed so far. Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-all.c | 46 + 1 fil

Re: [RFC PATCH v2 28/48] accel/dummy: Factor tcg_vcpu_thread_precreate() out

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Factor tcg_vcpu_thread_precreate() out for re-use. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.h | 1 + accel/tcg/tcg-accel-ops-mttcg.c | 3 +-- accel/tcg/tcg-accel-ops-rr.c| 3 +-- accel/tcg/tcg-accel-ops.c

Re: [RFC PATCH RESEND 02/42] accel/split: Define SplitAccelState

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel.h | 38 ++ accel/split/split-all.c | 5 - 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 accel/split/split-accel.

Re: [RFC PATCH RESEND 01/42] accel/split: Minimal stubs for split accelerator

2025-06-21 Thread Richard Henderson
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: From: Julian Armistead Signed-off-by: Julian Armistead Signed-off-by: Philippe Mathieu-Daudé --- accel/split/split-accel-ops.c | 161 ++ accel/split/split-all.c | 77 system/vl.c

Re: [RFC PATCH v2 40/48] accel: Factor accel_cpu_realize() out

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Factor accel_cpu_realize() out of accel_cpu_common_realize() for re-use. Signed-off-by: Philippe Mathieu-Daudé --- accel/accel-internal.h | 2 ++ accel/accel-common.c | 15 --- 2 files changed, 14 insertions(+), 3 deletions(-)

Re: [RFC PATCH v2 39/48] accel/system: Introduce hwaccel_enabled() helper

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: hwaccel_enabled() return whether any hardware accelerator is available. Signed-off-by: Philippe Mathieu-Daudé --- include/system/hw_accel.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/system/hw_accel.h b/i

Re: [RFC PATCH v2 35/48] accel/nvmm: Convert to AccelOpsClass::cpu_thread_routine

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: By converting toAccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-accel-ops.c | 12 +--- 1 file changed, 1 insertion(+),

Re: [RFC PATCH v2 33/48] accel/hvf: Convert to AccelOpsClass::cpu_thread_routine

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: By converting toAccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-accel-ops.c | 18 +- 1 file changed, 1 insertion(+), 17

Re: [RFC PATCH v2 32/48] accel/tcg: Convert to AccelOpsClass::cpu_thread_routine

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: By converting toAccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-mttcg.h | 3 +-- accel/tcg/tcg-accel-ops-mttcg.c | 16 +-

Re: [RFC PATCH v2 31/48] accel/dummy: Convert to AccelOpsClass::cpu_thread_routine

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: By converting toAccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- include/system/cpus.h | 4 +--- accel/dummy-cpus.c| 14 +- accel/qt

Re: [RFC PATCH v2 27/48] accel/dummy: Factor dummy_thread_precreate() out

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Initialize the semaphore before creating the thread, factor out as dummy_thread_precreate(). Signed-off-by: Philippe Mathieu-Daudé --- include/system/cpus.h | 1 + accel/dummy-cpus.c| 12 +--- 2 files changed, 10 insertions(+), 3

Re: [RFC PATCH v2 25/48] accel/system: Document cpu_synchronize_state()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/system/accel-ops.h | 8 include/system/hw_accel.h | 13 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 18/26] target/arm/hvf: Trace host processor features

2025-06-21 Thread Richard Henderson
On 6/20/25 06:07, Philippe Mathieu-Daudé wrote: Tracing an Apple M1 (Icestorm core, ARMv8.4-A): hvf_processor_feature_register EL0: 1 hvf_processor_feature_register EL1: 1 hvf_processor_feature_register EL2: 0 hvf_processor_feature_register FP: 1 hvf_processor_feature_register Adv

Re: [RFC PATCH v2 20/48] cpus: Rename 'vcpu_dirty' field as negated 'hwaccel_synchronized'

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Try to better describe which side is dirty (QEMU process or hardware accelerator) by renaming as @hwaccel_synchronized. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 4 ++-- accel/kvm/kvm-all.c | 20 ++--

Re: [RFC PATCH v2 04/48] accel/kvm: Remove kvm_init_cpu_signals() stub

2025-06-21 Thread Richard Henderson
On 6/20/25 10:12, Philippe Mathieu-Daudé wrote: Since commit 57038a92bb0 ("cpus: extract out kvm-specific code to accel/kvm") the kvm_init_cpu_signals() stub is not necessary. Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/kvm-stub.c | 5 - 1 file changed, 5 deletions(-) diff --g

Re: [RFC PATCH v2 03/48] system/cpus: Assert interrupt handling is done with BQL locked

2025-06-21 Thread Richard Henderson
On 6/20/25 10:12, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.c | 2 -- system/cpus.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index da2e22a7dff

Re: [RFC PATCH v2 19/48] cpus: Document CPUState::vcpu_dirty field

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 33296a1c080..69ea425c458 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/

Re: [RFC PATCH v2 18/48] accel/hvf: Implement get_vcpu_stats()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-accel-ops.c | 19 +++ 1 file changed, 19 insertions(+) Reviewed-by: Richard Henderson r~

Re: [RFC PATCH v2 17/48] accel/tcg: Implement get_[vcpu]_stats()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-all.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 28206ca5e76..f5920b5796e 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg

Re: [RFC PATCH v2 15/48] accel/system: Add 'info accel' on human monitor

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: 'info accel' dispatches to theAccelOpsClass::get_stats() and get_vcpu_stats() handlers. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 1 + include/system/accel-ops.h | 2 ++ accel/accel-system.c | 28 +++

Re: [RFC PATCH v2 12/48] accel: Move cpus_are_resettable() declaration to AccelClass

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: AccelOpsClass is for methods dealing with vCPUs. When only dealing with AccelState, AccelClass is sufficient. Move cpus_are_resettable() declaration to accel/accel-system.c. In order to have AccelClass methods instrospect their state, we need to p

Re: [RFC PATCH v2 11/48] accel: Move supports_guest_debug() declaration to AccelClass

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: AccelOpsClass is for methods dealing with vCPUs. When only dealing with AccelState, AccelClass is sufficient. In order to have AccelClass methods instrospect their state, we need to pass AccelState by argument. Signed-off-by: Philippe Mathieu-Daud

Re: [RFC PATCH v2 10/48] accel: Pass AccelState argument to gdbstub_supported_sstep_flags()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: In order to have AccelClass methods instrospect their state, we need to pass AccelState by argument. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 2 +- accel/accel-common.c | 2 +- accel/hvf/hvf-accel-ops.c | 2 +-

Re: [RFC PATCH v2 01/48] system/runstate: Document qemu_add_vm_change_state_handler()

2025-06-21 Thread Richard Henderson
On 6/20/25 10:12, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/system/runstate.h | 10 ++ 1 file changed, 10 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 07/26] accel/hvf: Trace VM memory mapping

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Trace memory mapped / unmapped in the guest. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 1 + accel/hvf/trace.h | 2 ++ accel/hvf/hvf-accel-ops.c | 6 ++ accel/hvf/trace-events| 7 +++ 4 files ch

Re: [PATCH v2 21/26] hw/arm/virt: Rename cpu_post_init() -> post_cpus_gic_realized()

2025-06-21 Thread Richard Henderson
On 6/20/25 06:07, Philippe Mathieu-Daudé wrote: QDev uses _post_init() during instance creation, before being realized. Since here both vCPUs and GIC are REALIZED, rename as virt_post_cpus_gic_realized() for clarity. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 5 +++-- 1 file ch

Re: [PATCH v2 22/26] hw/arm/sbsa-ref: Tidy up use of RAMLIMIT_GB definition

2025-06-21 Thread Richard Henderson
On 6/20/25 06:07, Philippe Mathieu-Daudé wrote: Define RAMLIMIT_BYTES using the TiB definition and display the error parsed with size_to_str(): $ qemu-system-aarch64-unsigned -M sbsa-ref -m 9T qemu-system-aarch64-unsigned: sbsa-ref: cannot model more than 8 TiB of RAM Signed-off-by: Phili

Re: [PATCH v2 23/26] tests/functional: Restrict nexted Aarch64 Xen test to TCG

2025-06-21 Thread Richard Henderson
On 6/20/25 06:07, Philippe Mathieu-Daudé wrote: On macOS this test fails: qemu-system-aarch64: mach-virt: HVF does not support providing Virtualization extensions to the guest CPU Signed-off-by: Philippe Mathieu-Daudé --- tests/functional/test_aarch64_xen.py | 1 + 1 file changed, 1 ins

Re: [PATCH v2 10/26] accel/hvf: Model PhysTimer register

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Emulate PhysTimer dispatching to TCG, like we do with GIC registers. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/hvf/hvf.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 04/26] target/arm/hvf: Simplify GIC hvf_arch_init_vcpu()

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Only update the ID_AA64PFR0_EL1 register when a GIC is provided. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/hvf/hvf.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 25/26] tests/functional: Add hvf_available() helper

2025-06-21 Thread Richard Henderson
On 6/20/25 06:07, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- python/qemu/utils/__init__.py | 2 +- python/qemu/utils/accel.py | 8 tests/functional/qemu_test/testcase.py | 6 -- 3 files changed, 13 insertions(+), 3 deletions(-)

Re: [PATCH v2 16/26] accel/hvf: Add hvf_arch_cpu_realize() stubs

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Implement HVFAccelOpsClass::cpu_target_realize() hook as empty stubs. Target implementations will come separately. Signed-off-by: Philippe Mathieu-Daudé --- include/system/hvf.h | 3 +++ accel/hvf/hvf-accel-ops.c | 2 ++ target/arm/hvf/hvf

Re: [PATCH v2 15/26] accel: Introduce AccelOpsClass::cpu_target_realize() hook

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Allow accelerators to set vCPU properties before its realization. Signed-off-by: Philippe Mathieu-Daudé --- include/system/accel-ops.h | 1 + accel/accel-common.c | 3 +++ 2 files changed, 4 insertions(+) Reviewed-by: Richard Henderson

Re: [PATCH v2 13/26] target/arm: Create GTimers *after* features finalized / accel realized

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Call generic (including accelerator) cpu_realize() handlers *before* setting @gt_cntfrq_hz default Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 65 1 file changed, 33 insertions(+)

[PATCH v2 056/101] target/arm: Introduce do_[us]sat_[bhs] macros

2025-06-21 Thread Richard Henderson
Inputs are a wider type of indeterminate sign. Signed-off-by: Richard Henderson --- target/arm/tcg/vec_internal.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/arm/tcg/vec_internal.h b/target/arm/tcg/vec_internal.h index 64a7249d01..c0ccf6da7a 100644 --- a/target/arm/tcg/vec_

Re: [PATCH v2 05/26] target/arm/hvf: Directly re-lock BQL after hv_vcpu_run()

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Keep bql_unlock() / bql_lock() close. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/hvf/hvf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Acked-by: Richard Henderson r~ diff --git a/target/arm/hvf/hvf.c b/target/arm

Re: [PATCH v2 11/26] target/arm/hvf: Pass @target_el argument to hvf_raise_exception()

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: In preparation of raising exceptions at EL2, add the 'target_el' argument to hvf_raise_exception(). Signed-off-by: Philippe Mathieu-Daudé --- target/arm/hvf/hvf.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by

Re: [PATCH v2 09/26] target/arm: Correct KVM & HVF dtb_compatible value

2025-06-21 Thread Richard Henderson
On 6/20/25 06:06, Philippe Mathieu-Daudé wrote: Linux kernel knows how to parse "arm,armv8", not "arm,arm-v8". See arch/arm64/boot/dts/foundation-v8.dts: https://github.com/torvalds/linux/commit/90556ca1ebdd Fixes: 26861c7ce06 ("target-arm: Add minimal KVM AArch64 support") Fixes: 585df85ef

[PATCH v2 011/101] target/arm: Remove CPUARMState.vfp.scratch

2025-06-21 Thread Richard Henderson
The last use of this field was removed in b2fc7be972b9. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 302c24e232..15b47a5bfc 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -668,9 +668

[PATCH v2 082/101] target/arm: Implement ANDQV, ORQV, EORQV for SVE2p1

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/helper-sve.h| 15 target/arm/tcg/sve_helper.c| 42 ++ target/arm/tcg/translate-sve.c | 3 +++ target/arm/tcg/sve.decode | 5 4 files changed, 65 insertions(+) diff --git a/target/

[PATCH v2 085/101] target/arm: Implement CNTP (predicate as counter) for SME2/SVE2p1

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/helper-sve.h| 1 + target/arm/tcg/sve_helper.c| 59 ++ target/arm/tcg/translate-sve.c | 30 + target/arm/tcg/sve.decode | 3 +- 4 files changed, 92 insertions(+), 1 deletion(-) diff

[PATCH v2 004/101] tcg: Add base arguments to check_overlap_[234]

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 55 ++- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index c26cfb24cc..54304d08cc 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@

[PATCH v2 091/101] target/arm: Implement SME2 counted predicate register load/store

2025-06-21 Thread Richard Henderson
Implement the SVE2p1 consecutive register LD1/ST1, and the SME2 strided register LD1/ST1. Signed-off-by: Richard Henderson --- target/arm/tcg/helper-sve.h| 16 + target/arm/tcg/sve_helper.c| 534 + target/arm/tcg/translate-sve.c | 101 +++ target/arm/

[PATCH v2 048/101] target/arm: Implement SME2 FMLA, FMLS

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/translate-sme.c | 95 ++ target/arm/tcg/sme.decode | 48 + 2 files changed, 143 insertions(+) diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c index 8127f2e641..63

[PATCH v2 059/101] target/arm: Implement SQCVTN, UQCVTN, SQCVTUN for SME2/SVE2p1

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/translate-sve.c | 7 +++ target/arm/tcg/sve.decode | 20 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/target/arm/tcg/translate-sve.c b/target/arm/tcg/translate-sve.c index 95121cce8e..a854c40ea2

[PATCH v2 052/101] target/arm: Implement SME2 FCVT (widening), FCVTL

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/helper-sme.h| 2 ++ target/arm/tcg/sme_helper.c| 38 ++ target/arm/tcg/translate-sme.c | 5 + target/arm/tcg/sme.decode | 5 + 4 files changed, 50 insertions(+) diff --git a/target/arm/tcg

[PATCH v2 080/101] target/arm: Implement {ADD, SMIN, SMAX, UMIN, UMAX}QV for SVE2p1

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/helper-sve.h| 25 ++ target/arm/tcg/sve_helper.c| 46 ++ target/arm/tcg/translate-sve.c | 35 ++ target/arm/tcg/sve.decode | 7 ++ 4 files changed, 113 ins

[PATCH v2 076/101] target/arm: Implement SVE2p1 WHILE (predicate pair)

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/helper-sve.h| 3 +++ target/arm/tcg/sve_helper.c| 44 ++ target/arm/tcg/translate-sve.c | 14 +++ target/arm/tcg/sve.decode | 8 +++ 4 files changed, 65 insertions(+), 4 deletions(-) di

[PATCH v2 054/101] target/arm: Implement SME2 SCVTF, UCVTF

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/translate-sme.c | 5 + target/arm/tcg/sme.decode | 5 + 2 files changed, 10 insertions(+) diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c index e5694a398d..733b7a0743 100644 --- a/target/arm/tcg/transla

[PATCH v2 030/101] target/arm: Implement SME2 Multiple Vectors SVE Destructive

2025-06-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/translate-sme.c | 65 ++ target/arm/tcg/sme.decode | 36 +++ 2 files changed, 101 insertions(+) diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c index 0e05153924..

  1   2   >