From 963f1576c0cd4893f566572535edeed9d341017b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 28 Oct 2025 06:41:41 +0100 Subject: [PATCH] accel/hvf: Rename hvf_vcpu_exec() -> hvf_arch_vcpu_exec() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit hvf_vcpu_exec() is implemented per target, rename it as hvf_arch_vcpu_exec(), following the per target pattern. Since it calls hv_vcpu_run(), mention it must be called on the vCPU. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- accel/hvf/hvf-accel-ops.c | 2 +- include/system/hvf_int.h | 4 +++- target/arm/hvf/hvf.c | 2 +- target/i386/hvf/hvf.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 8b794c2d41..005e2bd891 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -194,7 +194,7 @@ static void *hvf_cpu_thread_fn(void *arg) do { qemu_process_cpu_events(cpu); if (cpu_can_run(cpu)) { - r = hvf_vcpu_exec(cpu); + r = hvf_arch_vcpu_exec(cpu); if (r == EXCP_DEBUG) { cpu_handle_guest_debug(cpu); } diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index a3b06a3e75..32b32e1d02 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -73,12 +73,14 @@ int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); -int hvf_vcpu_exec(CPUState *); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); int hvf_put_registers(CPUState *); int hvf_get_registers(CPUState *); void hvf_kick_vcpu_thread(CPUState *cpu); +/* Must be called by the owning thread */ +int hvf_arch_vcpu_exec(CPUState *); + struct hvf_sw_breakpoint { vaddr pc; vaddr saved_insn; diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index bbe0b24b82..9111c1d717 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1788,7 +1788,7 @@ static void hvf_sync_vtimer(CPUState *cpu) } } -int hvf_vcpu_exec(CPUState *cpu) +int hvf_arch_vcpu_exec(CPUState *cpu) { ARMCPU *arm_cpu = ARM_CPU(cpu); CPUARMState *env = &arm_cpu->env; diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 33f723a76a..b2bf59cb48 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -721,7 +721,7 @@ void hvf_simulate_wrmsr(CPUState *cs) printf("write msr %llx\n", RCX(cs));*/ } -int hvf_vcpu_exec(CPUState *cpu) +int hvf_arch_vcpu_exec(CPUState *cpu) { X86CPU *x86_cpu = X86_CPU(cpu); CPUX86State *env = &x86_cpu->env; -- 2.47.3