aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/x86-iommu.c
diff options
context:
space:
mode:
authorDavid Kiarie <davidkiarie4@gmail.com>2016-09-20 18:42:34 +0300
committerMichael S. Tsirkin <mst@redhat.com>2016-09-24 01:02:01 +0300
commitfb9f592623b0f9bb82a88d68d7921fb581918ef5 (patch)
tree5e727dd26add4568812f6dda16cb927dc64494b0 /hw/i386/x86-iommu.c
parentd29a09ca68428b5708024ea2e9143de0a031081d (diff)
hw/i386: AMD IOMMU IVRS table
Add IVRS table for AMD IOMMU. Generate IVRS or DMAR depending on emulated IOMMU. Signed-off-by: David Kiarie <davidkiarie4@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/x86-iommu.c')
-rw-r--r--hw/i386/x86-iommu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index ce26b2a71d..2278af7c32 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -71,6 +71,11 @@ X86IOMMUState *x86_iommu_get_default(void)
return x86_iommu_default;
}
+IommuType x86_iommu_get_type(void)
+{
+ return x86_iommu_default->type;
+}
+
static void x86_iommu_realize(DeviceState *dev, Error **errp)
{
X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev);
@@ -79,6 +84,7 @@ static void x86_iommu_realize(DeviceState *dev, Error **errp)
if (x86_class->realize) {
x86_class->realize(dev, errp);
}
+
x86_iommu_set_default(X86_IOMMU_DEVICE(dev));
}