aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/pci.h
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2011-07-08 08:38:35 +0100
committerAndrew Cooper <andrew.cooper3@citrix.com>2011-07-08 08:38:35 +0100
commitc24c3e21e3c966a1fefc8c3beeb11a6a045ffe5c (patch)
treeb3a59c1434dd450da2548b075f7fd9c3e56b0c5e /xen/include/xen/pci.h
parent56a86d9c66c355da0433b86fe893b06d9829ac0c (diff)
downloadxen-c24c3e21e3c966a1fefc8c3beeb11a6a045ffe5c.tar.gz
xen-c24c3e21e3c966a1fefc8c3beeb11a6a045ffe5c.tar.bz2
xen-c24c3e21e3c966a1fefc8c3beeb11a6a045ffe5c.zip
KEXEC: disconnect all PCI devices from the PCI bus on crash
In the case of a crash, IOMMU DMA remapping gets turned off so that the kdump kernel may boot. However, this is warned as being dangerous in the VTD specification if a DMA transaction is in progress. Also, in the case of a crash, DMA transactions and interrupts from peripheral devices such as network cards are likely to keep coming in. Without DMA remapping enabled, the transactions will be writing over low memory, corrupting the crash state, and perhaps even the kdump reserved memory. Therefore, on the crash path, we can disconnect all PCI devices from their respective buses so that they are no longer able to be DMA busmasters. This reduces the risk of DMA transactions corrupting state (and will also reduce spurious interrupts arriving to the kdump kernel) until the kdump kernel and properly reset the PCI devices. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Diffstat (limited to 'xen/include/xen/pci.h')
-rw-r--r--xen/include/xen/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index 49eabbcd49..56355c79b9 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -92,6 +92,8 @@ int pci_add_device_ext(u8 bus, u8 devfn, struct pci_dev_info *info);
struct pci_dev *pci_get_pdev(int bus, int devfn);
struct pci_dev *pci_get_pdev_by_domain(struct domain *d, int bus, int devfn);
+void disconnect_pci_devices(void);
+
uint8_t pci_conf_read8(
unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg);
uint16_t pci_conf_read16(