: Fix kdump under KVM
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 12 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | Fix up some comments around the source tree.arch/ virt/ virt/ | +4 | 0 replies | |
| 2/12 | Make kvm_pic_reset static.arch/ arch/ | +1 | 0 replies | |
| 3/12 | Remove KVM_REQ_PENDING_TIMER.arch/ arch/ include/ | +1 | 5 replies | |
| 4/12 | IOAPIC timer interrupt redirect.virt/ | +13 | 1 reply | |
| 5/12 | Make the IOAPIC lock a spinlock.virt/ virt/ | +26 | 1 reply | |
| 6/12 | Make the PIC use interrupt safe locking.arch/ | +22 | 0 replies | |
| 7/12 | Rename kvm_apic_accept_pic_intrarch/ arch/ arch/ +1 more | +12 | 2 replies | |
| 8/12 | Remove timer.carch/ arch/ arch/ +2 more | +61 | 1 reply | |
| 9/12 | Fix missing spin_lock in PIT timer.arch/ | +3 | 0 replies | |
| 10/12 | Inject i8254 interrupts directly from hrtimer callback.arch/ arch/ arch/ +1 more | +23 | 0 replies | |
| 11/12 | Allow the PIC to signal CPUs other than BSP.arch/ | +10 | 0 replies | |
| 12/12 | Kick appropriate CPUs when signalling interrupts.virt/ | +4 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/12]: Fix kdump under KVM
Another version of the patch series to make kdump work inside KVM guests. The current problem with using kdump is that KVM only delivers PIT interrupts to the BSP. While this is technically allowed by the MPS spec, most motherboards deliver timer interrupts to *any* LAPIC in virtual wire mode. Since a crash can occur on any CPU, timer interrupts must be able to reach any CPU in order for kdump to work properly. Therefore, this series allows timer interrupts to be routed to any virtual CPU that is in the correct mode.
I've broken up the series into much smaller chunks now; some of them can be applied on their own as bug fixes. There are a few changes to this series from the last time I posted. They are:
1) I've taken Marcelo's advice to only redirect PIT interrupts in the IOAPIC to the BSP if the destination is multiple vcpus.
2) I've changed it so that we use a spin_lock() in the IOAPIC instead of a mutex lock, based on the discussion with Avi. This means that we can get rid of all of the "delayed" interrupt action in the PIT and just directly "set_irq" in the hrtimer callbacks.
The conversion of the IOAPIC to a spin_lock instead of a mutex_lock caused some concern with Avi when we last discussed it. In particular he was concerned that any notifiers that kvm_set_irq kicked off were safe from an IRQ context. From what I can tell, there are two sets of notifiers: the IRQ mask notifiers and the IRQ ACK notifiers. There is one, and only one mask notifier, in the PIT; it merely sets a flag, so it should be interrupt safe. For the IRQ ACK notifiers, there is one notifier for the PIT and one for assigned-dev.c. The one in the PIT is definitely interrupt safe, it just sets a flag. The one in assigned-dev is more complicated. It calls out to kvm_set_irq() (which is IRQ-safe now), and also calls out to enable_irq(), which should be interrupt-safe as long as bus_lock is not set (which it never is, from what I can tell). Therefore, I *think* this should be safe, although I don't have VT-d hardware available at the moment to test for sure.
I did basic smoke testing on a few different SMP guests: Fedora 11 i386, Fedora 12 x86_64, Red Hat Linux 5.2, Windows XP i386, RHEL-4.8, Ubuntu 8.10, Windows 2003 i386, and RHEL-5.3. I also did targetted testing of the kdump feature in the RHEL-5.3 guest, and kdump works there.