aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/core/machine.c5
-rw-r--r--hw/pci-host/q35.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index fbd91be..096eb10 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -403,6 +403,11 @@ bool machine_usb(MachineState *machine)
return machine->usb;
}
+bool machine_iommu(MachineState *machine)
+{
+ return machine->iommu;
+}
+
static const TypeInfo machine_info = {
.name = TYPE_MACHINE,
.parent = TYPE_OBJECT,
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index df60e61..c8827cc 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -415,7 +415,7 @@ static void mch_realize(PCIDevice *d, Error **errp)
PAM_EXPAN_BASE + i * PAM_EXPAN_SIZE, PAM_EXPAN_SIZE);
}
/* Intel IOMMU (VT-d) */
- if (qemu_opt_get_bool(qemu_get_machine_opts(), "iommu", false)) {
+ if (machine_iommu(current_machine)) {
mch_init_dmar(mch);
}
}