diff options
| author | Peter Xu <peterx@redhat.com> | 2016-07-14 13:56:12 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2016-07-20 19:30:27 +0300 |
| commit | 1cf5fd573f536de1eb601ed69127a324e940d37f (patch) | |
| tree | 5d67a7261759a8159faec8cb8eb44c68ffe1b8ec /include/hw/i386 | |
| parent | 04af0e18bc93c49faa94921b4326ef9261a2fa27 (diff) | |
| download | focaccia-qemu-1cf5fd573f536de1eb601ed69127a324e940d37f.tar.gz focaccia-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/hw/i386')
| -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 |