aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/pci.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-01-07 12:55:42 +0100
committerJan Beulich <jbeulich@suse.com>2013-01-07 12:55:42 +0100
commit4e9950dc1bd23d0eb61f25c5355318bfdd33657e (patch)
treebe03bc00088704efd04a9b56bde9bc82b49f58ef /xen/include/xen/pci.h
parente7e08d86ad2fe984dccbe1a5673c33b3e118f12c (diff)
downloadxen-4e9950dc1bd23d0eb61f25c5355318bfdd33657e.tar.gz
xen-4e9950dc1bd23d0eb61f25c5355318bfdd33657e.tar.bz2
xen-4e9950dc1bd23d0eb61f25c5355318bfdd33657e.zip
IOMMU: add phantom function support
Apart from generating device context entries for the base function, all phantom functions also need context entries to be generated for them. In order to distinguish different use cases, a variant of pci_get_pdev() is being introduced that, even when passed a phantom function number, would return the underlying actual device. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Diffstat (limited to 'xen/include/xen/pci.h')
-rw-r--r--xen/include/xen/pci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index 7b550a3508..9724bb29c8 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -63,6 +63,8 @@ struct pci_dev {
const u8 bus;
const u8 devfn;
+ u8 phantom_stride;
+
enum pdev_type {
DEV_TYPE_PCI_UNKNOWN,
DEV_TYPE_PCIe_ENDPOINT,
@@ -114,6 +116,7 @@ int pci_ro_device(int seg, int bus, int devfn);
void arch_pci_ro_device(int seg, int bdf);
int pci_hide_device(int bus, int devfn);
struct pci_dev *pci_get_pdev(int seg, int bus, int devfn);
+struct pci_dev *pci_get_real_pdev(int seg, int bus, int devfn);
struct pci_dev *pci_get_pdev_by_domain(
struct domain *, int seg, int bus, int devfn);
void pci_check_disable_device(u16 seg, u8 bus, u8 devfn);