diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-19 10:20:11 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-03-19 10:20:11 +0000 |
commit | 3fdb2ba3063c84bf1adfd80a068d89f27bbaaf86 (patch) | |
tree | 8ff1289f08ef9b6cc968e44560d613e53ef3c972 /xen/include/xen/pci.h | |
parent | 8959f0c05a7b49783d64df47303ad53361a9a3d6 (diff) | |
download | xen-3fdb2ba3063c84bf1adfd80a068d89f27bbaaf86.tar.gz xen-3fdb2ba3063c84bf1adfd80a068d89f27bbaaf86.tar.bz2 xen-3fdb2ba3063c84bf1adfd80a068d89f27bbaaf86.zip |
Xen: use proper device ID to search VT-d unit for ARI and SR-IOV device
PCIe Alternative Routing-ID Interpretation (ARI) ECN defines the Extended
Function -- a function whose function number is greater than 7 within an
ARI Device. Intel VT-d spec 1.2 section 8.3.2 specifies that the Extended
Function is under the scope of the same remapping unit as the traditional
function. The hypervisor needs to know if a function is Extended
Function so it can find proper DMAR for it.
And section 8.3.3 specifies that the SR-IOV Virtual Function is under the
scope of the same remapping unit as the Physical Function. The hypervisor
also needs to know if a function is the Virtual Function and which
Physical Function it's associated with for same reason.
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Diffstat (limited to 'xen/include/xen/pci.h')
-rw-r--r-- | xen/include/xen/pci.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index 34f79b7a81..6827e0d677 100644 --- a/xen/include/xen/pci.h +++ b/xen/include/xen/pci.h @@ -31,6 +31,15 @@ #define MAX_MSIX_TABLE_ENTRIES 2048 #define MAX_MSIX_TABLE_PAGES 8 +struct pci_dev_info { + unsigned is_extfn; + unsigned is_virtfn; + struct { + u8 bus; + u8 devfn; + } physfn; +}; + struct pci_dev { struct list_head alldevs_list; struct list_head domain_list; @@ -43,6 +52,7 @@ struct pci_dev { struct domain *domain; const u8 bus; const u8 devfn; + struct pci_dev_info info; }; #define for_each_pdev(domain, pdev) \ @@ -64,6 +74,7 @@ struct pci_dev *pci_lock_domain_pdev(struct domain *d, int bus, int devfn); void pci_release_devices(struct domain *d); int pci_add_device(u8 bus, u8 devfn); int pci_remove_device(u8 bus, u8 devfn); +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); |