[PATCH] Fix writing back APIC reset to inkernel APIC

Markus Rechberger
2007-11-01T15:35:51Z

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

This patch synchronises the APIC reset with the inkernel implementation
which fixes the reboot issues which can be seen with Linux and Windows.

Signed-off-by: Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Markus Rechberger <markus.rechberger-5C7GfCeVMHo@public.gmane.org>

[-- Attachment #2: apic_reset_fix.diff --]
[-- Type: text/plain, Size: 490 bytes --]

diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index 2011247..60d31fa 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -930,6 +930,13 @@ static void apic_reset(void *opaque)
* processor when local APIC is enabled.
*/
s->lvt[APIC_LVT_LINT0] = 0x700;
+#ifdef USE_KVM
+#ifdef KVM_CAP_IRQCHIP
+ if (kvm_allowed && kvm_irqchip_in_kernel(kvm_context)) {
+ kvm_kernel_lapic_load_from_user(s);
+ }
+#endif
+#endif
}

static CPUReadMemoryFunc *apic_mem_read[3] = {

[-- Attachment #3: Type: text/plain, Size: 314 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]