[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/32] x86: ioapic: fix fail migration when irqchip=s
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 24/32] x86: ioapic: fix fail migration when irqchip=split |
Date: |
Mon, 16 Jan 2017 17:59:08 +0100 |
From: Peter Xu <address@hidden>
Split irqchip works based on the fact that we kept the first 24 gsi
routing entries inside KVM for userspace ioapic's use. When system
boot, we'll reserve these MSI routing entries before hand. However,
after migration, we forgot to re-configure it up in the destination
side. The result is, we'll get invalid gsi routing entries after
migration (all empty), and we get interrupts with vector=0, then
strange things happen, like keyboard hang.
The solution is simple - we update them after migration, which is a
one line fix.
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/intc/ioapic.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c
index d1254f8..9047b89 100644
--- a/hw/intc/ioapic.c
+++ b/hw/intc/ioapic.c
@@ -439,6 +439,11 @@ static void ioapic_class_init(ObjectClass *klass, void
*data)
DeviceClass *dc = DEVICE_CLASS(klass);
k->realize = ioapic_realize;
+ /*
+ * If APIC is in kernel, we need to update the kernel cache after
+ * migration, otherwise first 24 gsi routes will be invalid.
+ */
+ k->post_load = ioapic_update_kvm_routes;
dc->reset = ioapic_reset_common;
dc->props = ioapic_properties;
}
--
2.9.3
- [Qemu-devel] [PULL 09/32] hw: move reset handlers from vl.c to hw/core, (continued)
- [Qemu-devel] [PULL 09/32] hw: move reset handlers from vl.c to hw/core, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 13/32] event_notifier: cleanups around event_notifier_set_handler, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 14/32] build: remove --enable-colo/--disable-colo, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 15/32] stubs: remove stubs/kvm.c, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 16/32] acpi: filter based on CONFIG_ACPI_X86 rather than TARGET, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 20/32] qemu-thread: fix qemu_thread_set_name() race in qemu_thread_create(), Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 17/32] pc: fix crash in rtc_set_memory() if initial cpu is marked as hotplugged, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 18/32] scsi-block: fix direction of BYTCHK test for VERIFY commands, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 19/32] serial: fix memory leak in serial exit, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 21/32] hxtool: emit Texinfo headings as @subsection, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 24/32] x86: ioapic: fix fail migration when irqchip=split,
Paolo Bonzini <=
- [Qemu-devel] [PULL 22/32] x86: ioapic: add traces for ioapic, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 23/32] x86: ioapic: dump version for "info ioapic", Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 25/32] exec: Add missing rcu_read_unlock, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 26/32] char: fix ctrl-a b not working, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 27/32] ramblock-notifier: new, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 28/32] kvm: move cpu synchronization code, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 32/32] Revert "win32: don't run subprocess tests on Mingw32 platform", Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 30/32] Plumb the HAXM-based hardware acceleration support, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 31/32] hax: add Darwin support, Paolo Bonzini, 2017/01/16
- [Qemu-devel] [PULL 29/32] target/i386: Add Intel HAX files, Paolo Bonzini, 2017/01/16