diff options
| author | Peter Xu | 2016-07-14 07:56:12 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin | 2016-07-20 18:30:27 +0200 |
| commit | 1cf5fd573f536de1eb601ed69127a324e940d37f (patch) | |
| tree | 5d67a7261759a8159faec8cb8eb44c68ffe1b8ec /include | |
| parent | intel_iommu: rename VTD_PCI_DEVFN_MAX to x86-iommu (diff) | |
| download | qemu-1cf5fd573f536de1eb601ed69127a324e940d37f.tar.gz qemu-1cf5fd573f536de1eb601ed69127a324e940d37f.tar.xz qemu-1cf5fd573f536de1eb601ed69127a324e940d37f.zip | |
x86-iommu: provide x86_iommu_get_default
Instead of searching the device tree every time, one static variable is
declared for the default system x86 IOMMU device.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/i386/x86-iommu.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/i386/x86-iommu.h b/include/hw/i386/x86-iommu.h index fac693d1b5..b2401a6380 100644 --- a/include/hw/i386/x86-iommu.h +++ b/include/hw/i386/x86-iommu.h @@ -45,4 +45,10 @@ struct X86IOMMUState { SysBusDevice busdev; }; +/** + * x86_iommu_get_default - get default IOMMU device + * @return: pointer to default IOMMU device + */ +X86IOMMUState *x86_iommu_get_default(void); + #endif |
