x86-iommu: provide x86_iommu_get_default
commit1cf5fd573f536de1eb601ed69127a324e940d37f
authorPeter Xu <peterx@redhat.com>
Thu, 14 Jul 2016 05:56:12 +0000 (14 13:56 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 20 Jul 2016 16:30:27 +0000 (20 19:30 +0300)
tree5d67a7261759a8159faec8cb8eb44c68ffe1b8ec
parent04af0e18bc93c49faa94921b4326ef9261a2fa27
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>
hw/i386/acpi-build.c
hw/i386/x86-iommu.c
include/hw/i386/x86-iommu.h