Commit 9f721c9e3c for qemu.org

commit 9f721c9e3c7b9991abad4bb9864fa1cc7c833bed
Author: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
Date:   Tue Apr 14 06:11:25 2026 -0700

    accel/hvf: fix double hv_vcpu_destroy() causing teardown error on ARM

    The following callstack causes hv_vcpu_destroy() to be called twice,
    producing HV_BAD_ARGUMENT on the already-destroyed handler:

    hvf_vcpu_destroy
     |
     |_ hv_vcpu_destroy
     |
     |_ hvf_arch_vcpu_destroy
         |
         |_ hv_vcpu_destroy

    The first hv_vcpu_destroy call covers both x86 and arm. Let's remove the
    second one, as it is redundant.

    This reverts commit feee55d36a1c5d494ee73812d279b439bb05137c.

    Signed-off-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
    Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Message-ID: <ee6f642af1dab29aaf99f86ac9254ddd25765bf8.1776172276.git.matheus.bernardino@oss.qualcomm.com>
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>

diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index a5b30b9ef0..8b902c6882 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1301,15 +1301,10 @@ void hvf_arm_set_cpu_features_from_host(ARMCPU *cpu)

 void hvf_arch_vcpu_destroy(CPUState *cpu)
 {
-    hv_return_t ret;
-
     if (!hvf_irqchip_in_kernel()) {
         timer_free(cpu->accel->wfi_timer);
         cpu->accel->wfi_timer = NULL;
     }
-
-    ret = hv_vcpu_destroy(cpu->accel->fd);
-    assert_hvf_ok(ret);
 }

 static bool hvf_arm_el2_supported(void)