Commit 577aadd963 for qemu.org

commit 577aadd963ec264a051b32a6340292749b385c05
Author: Mohamed Mediouni <mohamed@unpredictable.fr>
Date:   Tue May 5 09:25:21 2026 +0100

    hvf: only call hvf_sync_vtimer() when running without the platform vGIC

    When running with the Apple vGIC, the EL1 vtimer is handled by the platform.

    Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
    Reviewed-by: Mads Ynddal <mads@ynddal.dk>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Message-id: 20260429190532.26538-7-mohamed@unpredictable.fr
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index e30442132c..0312c99077 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -2368,7 +2368,9 @@ static int hvf_handle_vmexit(CPUState *cpu, hv_vcpu_exit_t *exit)

     switch (exit->reason) {
     case HV_EXIT_REASON_EXCEPTION:
-        hvf_sync_vtimer(cpu);
+        if (!hvf_irqchip_in_kernel()) {
+            hvf_sync_vtimer(cpu);
+        }
         ret = hvf_handle_exception(cpu, &exit->exception);
         break;
     case HV_EXIT_REASON_VTIMER_ACTIVATED: