Revert c/s 23666:b96f8bdcaa15 KEXEC: disconnect all PCI devices from the PCI bus...
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 11 Nov 2011 18:14:35 +0000 (18:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 11 Nov 2011 18:14:35 +0000 (18:14 +0000)
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@citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/crash.c
xen/drivers/passthrough/pci.c
xen/include/xen/pci.h

index 2636950dbc9687af9e5f407c4404103474827a93..68174b51faca9b829c5ede8a5f1b73eabcc307e0 100644 (file)
@@ -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 @@ static void nmi_shootdown_cpus(void)
         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();
index 8edb707ae9ed54ae0aa0a49e599660cef2e45a65..b7f87d003ac0fced824008b48ee609d63a9736fb 100644 (file)
@@ -683,30 +683,6 @@ void __init setup_dom0_pci_devices(
     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)
 {
index edc9201991b083b5b05f177a26d522c13747e156..13c22f55641da75f42d5e93271f2a9691a9ad808 100644 (file)
@@ -100,8 +100,6 @@ struct pci_dev *pci_get_pdev(int seg, int bus, int devfn);
 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);