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 /hw/i386/acpi-build.c | |
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 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index fbba461a87..12ecf9564a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -52,7 +52,7 @@ #include "hw/i386/ich9.h" #include "hw/pci/pci_bus.h" #include "hw/pci-host/q35.h" -#include "hw/i386/intel_iommu.h" +#include "hw/i386/x86-iommu.h" #include "hw/timer/hpet.h" #include "hw/acpi/aml-build.h" @@ -2539,12 +2539,7 @@ static bool acpi_get_mcfg(AcpiMcfgInfo *mcfg) static bool acpi_has_iommu(void) { - bool ambiguous; - Object *intel_iommu; - - intel_iommu = object_resolve_path_type("", TYPE_INTEL_IOMMU_DEVICE, - &ambiguous); - return intel_iommu && !ambiguous; + return !!x86_iommu_get_default(); } static |