aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/pci.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-11-23 06:56:01 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-11-23 06:56:01 +0000
commitf38d55cb34b5c5853bb5b5c21537df6c68071876 (patch)
treeee7c717a3097ed0b5ff65a536409a4158e1d6cf5 /xen/include/xen/pci.h
parent93e6c4731dfb17687cde9a867717a0374b3a68f7 (diff)
downloadxen-f38d55cb34b5c5853bb5b5c21537df6c68071876.tar.gz
xen-f38d55cb34b5c5853bb5b5c21537df6c68071876.tar.bz2
xen-f38d55cb34b5c5853bb5b5c21537df6c68071876.zip
vt-d: enable PCI ACS P2P upstream forwarding
This patch enables P2P upstream forwarding in ACS capable PCIe switches. The enabling is conditioned on iommu_enabled variable. This code solves two potential problems in virtualization environment where a PCIe device is as signed to a guest domain using a HW iommu such as VT-d: 1) Unintentional failure caused by guest physical address programmed into the device's DMA that happens to match the memory address range of other downstream ports in the same PCIe switch. This causes the PCI transaction to go to the matching downstream port instead of go to the root complex to get translated by VT-d as it should be. 2) Malicious guest software intentionally attacks another downstream PCIe device by programming the DMA address into the assigned device that matches memory address range of the downstream PCIe port. Corresponding ACS filtering code is already in upstream control panel code that do not allow PCI device passthrough to guests if it is behind a PCIe switch that does not have ACS capability or with ACS capability but is not enabled. Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Diffstat (limited to 'xen/include/xen/pci.h')
-rw-r--r--xen/include/xen/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index abb8584ed3..1740698cc6 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -116,5 +116,6 @@ int pci_find_ext_capability(int seg, int bus, int devfn, int cap);
int msixtbl_pt_register(struct domain *d, int pirq, uint64_t gtable);
void msixtbl_pt_unregister(struct domain *d, int pirq);
+void pci_enable_acs(struct pci_dev *pdev);
#endif /* __XEN_PCI_H__ */