[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Revert c/s 23666:b96f8bdcaa15 KEXEC: disconnect all PCI devices from the PCI bus on crash



# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1321035275 0
# Node ID 0844b17df7a9dd885e98e505f14fc99c1951b483
# Parent  3622d7fae14dfc2d00f378738ace3b65ee65b6cc
Revert c/s 23666:b96f8bdcaa15 KEXEC: disconnect all PCI devices from the PCI 
bus on crash

It turns out that this causes all mannor of problems on certain
motherboards (so far with no pattern I can discern)

Problems include:
* Hanging forever checking hlt instruction.
* Panics when trying to change switch root device
* Drivers hanging when trying to check for interrupts.

From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 3622d7fae14d -r 0844b17df7a9 xen/arch/x86/crash.c
--- a/xen/arch/x86/crash.c      Fri Nov 11 18:11:34 2011 +0000
+++ b/xen/arch/x86/crash.c      Fri Nov 11 18:14:35 2011 +0000
@@ -28,7 +28,6 @@
 #include <asm/apic.h>
 #include <asm/io_apic.h>
 #include <xen/iommu.h>
-#include <xen/pci.h>
 #include <asm/hpet.h>
 
 static atomic_t waiting_for_crash_ipi;
@@ -83,8 +82,6 @@
         msecs--;
     }
 
-    disconnect_pci_devices();
-
     /* Crash shutdown any IOMMU functionality as the crashdump kernel is not
      * happy when booting if interrupt/dma remapping is still enabled */
     iommu_crash_shutdown();
diff -r 3622d7fae14d -r 0844b17df7a9 xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c     Fri Nov 11 18:11:34 2011 +0000
+++ b/xen/drivers/passthrough/pci.c     Fri Nov 11 18:14:35 2011 +0000
@@ -683,30 +683,6 @@
     spin_unlock(&pcidevs_lock);
 }
 
-/* Disconnect all PCI devices from the PCI buses. From the PCI spec:
- *   "When a 0 is written to [the COMMAND] register, the device is
- *    logically disconnected from the PCI bus for all accesses except
- *    configuration accesses. All devices are required to support
- *    this base level of functionality."
- */
-static int _disconnect_pci_devices(struct pci_seg *pseg, void *arg)
-{
-    struct pci_dev *pdev;
-
-    list_for_each_entry ( pdev, &pseg->alldevs_list, alldevs_list )
-        pci_conf_write16(pseg->nr, pdev->bus, PCI_SLOT(pdev->devfn),
-                         PCI_FUNC(pdev->devfn), PCI_COMMAND, 0);
-
-    return 0;
-}
-
-void disconnect_pci_devices(void)
-{
-    spin_lock(&pcidevs_lock);
-    pci_segments_iterate(_disconnect_pci_devices, NULL);
-    spin_unlock(&pcidevs_lock);
-}
-
 #ifdef SUPPORT_MSI_REMAPPING
 static int _dump_pci_devices(struct pci_seg *pseg, void *arg)
 {
diff -r 3622d7fae14d -r 0844b17df7a9 xen/include/xen/pci.h
--- a/xen/include/xen/pci.h     Fri Nov 11 18:11:34 2011 +0000
+++ b/xen/include/xen/pci.h     Fri Nov 11 18:14:35 2011 +0000
@@ -100,8 +100,6 @@
 struct pci_dev *pci_get_pdev_by_domain(
     struct domain *, int seg, int bus, int devfn);
 
-void disconnect_pci_devices(void);
-
 uint8_t pci_conf_read8(
     unsigned int seg, unsigned int bus, unsigned int dev, unsigned int func,
     unsigned int reg);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.