WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Xen crash on dom0 shutdown

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Xen crash on dom0 shutdown
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 23 Sep 2008 11:34:05 +0100
Delivery-date: Tue, 23 Sep 2008 03:33:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
There is a BUG_ON() at xen/arch/x86/physdev.c:169 which appears to
be dependent upon guest behavior (should close event channel before
un-mapping pirq), rather than on internal hypervisor state. In 2.6.18,
this likely goes unnoticed because pci_device_shutdown() only calls all
the driver shutdown routines. In newer kernels, however, it also calls
pci_msi_shutdown() and pci_msix_shutdown(), which remove all pirq
mappings. If now (which commonly appears to be the case for storage
drivers) an MSI/MSI-X driver has no shutdown handler (or one that
doesn't do much, because on native this is not causing any problems),
the assumption in Xen is violated and the hypervisor crashes.

Simply removing the BUG_ON() seems inappropriate, though. But I'm
uncertain whether it would be reasonable to call pirq_guest_unbind()
instead of the BUG_ON(), and if so, how to properly deal with
irq_desc[vector].lock (the immediate idea would be to factor out the
locking into a wrapper function, but an alternative would be to use
recursive locks, and perhaps there are other possibilities).

Thanks for any hints, Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel