]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/i386: Use device_cold_reset() to reset the APIC
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 13 Oct 2022 17:19:26 +0000 (18:19 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Oct 2022 11:58:04 +0000 (13:58 +0200)
The semantic difference between the deprecated device_legacy_reset()
function and the newer device_cold_reset() function is that the new
function resets both the device itself and any qbuses it owns,
whereas the legacy function resets just the device itself and nothing
else.

The x86_cpu_after_reset() function uses device_legacy_reset() to reset
the APIC; this is an APICCommonState and does not have any qbuses, so
for this purpose the two functions behave identically and we can stop
using the deprecated one.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20221013171926.1447899-1-peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c

index 90aec2f462ec1a17f83e459a212ad960814c42cd..6279745f79b54cbc5c06e755563793a21640e3a9 100644 (file)
@@ -6043,7 +6043,7 @@ void x86_cpu_after_reset(X86CPU *cpu)
     }
 
     if (cpu->apic_state) {
-        device_legacy_reset(cpu->apic_state);
+        device_cold_reset(cpu->apic_state);
     }
 #endif
 }