From 1cf5fd573f536de1eb601ed69127a324e940d37f Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Thu, 14 Jul 2016 13:56:12 +0800 Subject: 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/x86-iommu.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/hw/i386') 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 -- cgit v1.2.3