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.). Signed-off-by: Jan Kiszka --- qemu/hw/apic.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c index 20e995c..8836784 100644 --- a/qemu/hw/apic.c +++ b/qemu/hw/apic.c @@ -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] = { -- 1.5.6