Skip to contentSkip to conversation

kvm-userspace: Fix in-kernel IOAPIC reset

PATCH Applied Jan Kiszka 2 participants 2 messages Nov 15, 2008 – Nov 16, 2008 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 kvm-userspace: Fix in-kernel IOAPIC reset

Transfer ioapic state to the in-kernel implementation on reset, fixing a systematic reboot issue of 2.6.18 RHEL/CentOS kernels, but probably also other, more sporadic reboot hangs (seen after Windows Vista installation e.g.).

---
 qemu/hw/apic.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
qemu/hw/apic.c +6 -0
index 20e995c..8836784 100644
@@ -1246,8 +1246,14 @@ static void ioapic_reset(void *opaque)
     int i;
 
     memset(s, 0, sizeof(*s));
+    s->base_address = IOAPIC_DEFAULT_BASE_ADDRESS;
     for(i = 0; i < IOAPIC_NUM_PINS; i++)
         s->ioredtbl[i] = 1 << 16; /* mask LVT */
+#ifdef KVM_CAP_IRQCHIP
+    if (kvm_enabled() && qemu_kvm_irqchip_in_kernel()) {
+        kvm_kernel_ioapic_load_from_user(s);
+    }
+#endif
 }
 
 static CPUReadMemoryFunc *ioapic_mem_read[3] = {
Signature · 1 line
1.5.6
Applied
#1 lore raw
Quoted 6 lines · Jan Kiszka

Transfer ioapic state to the in-kernel implementation on reset, fixing a systematic reboot issue of 2.6.18 RHEL/CentOS kernels, but probably also other, more sporadic reboot hangs (seen after Windows Vista installation e.g.).

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function