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. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html