public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/12]: Fix kdump under KVM
@ 2009-12-01 14:36 Chris Lalancette
  2009-12-01 14:36 ` [PATCH 01/12] Fix up some comments around the source tree Chris Lalancette
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Chris Lalancette @ 2009-12-01 14:36 UTC (permalink / raw)
  To: 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.

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2009-12-08 10:49 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 14:36 [PATCH 0/12]: Fix kdump under KVM Chris Lalancette
2009-12-01 14:36 ` [PATCH 01/12] Fix up some comments around the source tree Chris Lalancette
2009-12-01 14:36 ` [PATCH 02/12] Make kvm_pic_reset static Chris Lalancette
2009-12-01 14:36 ` [PATCH 03/12] Remove KVM_REQ_PENDING_TIMER Chris Lalancette
2009-12-01 19:04   ` Jan Kiszka
2009-12-02  4:59     ` Marcelo Tosatti
2009-12-02 12:59     ` Chris Lalancette
2009-12-02 14:16       ` Avi Kivity
2009-12-02 14:22         ` Avi Kivity
2009-12-01 14:36 ` [PATCH 04/12] IOAPIC timer interrupt redirect Chris Lalancette
2009-12-02  5:03   ` Marcelo Tosatti
2009-12-01 14:36 ` [PATCH 05/12] Make the IOAPIC lock a spinlock Chris Lalancette
2009-12-02 14:27   ` Avi Kivity
2009-12-01 14:36 ` [PATCH 06/12] Make the PIC use interrupt safe locking Chris Lalancette
2009-12-01 14:36 ` [PATCH 07/12] Rename kvm_apic_accept_pic_intr Chris Lalancette
2009-12-02 14:24   ` Avi Kivity
2009-12-02 16:12   ` Gleb Natapov
2009-12-01 14:36 ` [PATCH 08/12] Remove timer.c Chris Lalancette
2009-12-02  5:11   ` Marcelo Tosatti
2009-12-01 14:36 ` [PATCH 09/12] Fix missing spin_lock in PIT timer Chris Lalancette
2009-12-01 14:36 ` [PATCH 10/12] Inject i8254 interrupts directly from hrtimer callback Chris Lalancette
2009-12-01 14:36 ` [PATCH 11/12] Allow the PIC to signal CPUs other than BSP Chris Lalancette
2009-12-01 14:36 ` [PATCH 12/12] Kick appropriate CPUs when signalling interrupts Chris Lalancette
2009-12-02 15:44   ` Gleb Natapov
2009-12-08 10:48     ` Chris Lalancette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox