diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
index 03b5ef825a..f48f172c37 100644
--- a/src/qemu/qemu_postparse.c
+++ b/src/qemu/qemu_postparse.c
@@ -1547,6 +1547,13 @@ qemuDomainDefEnableDefaultFeatures(virDomainDef *def,
* capabilities, we still want to enable this */
def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
}
+
+ /* IOMMU with intremap requires split I/O APIC */
+ if (def->iommu &&
+ def->iommu->intremap == VIR_TRISTATE_SWITCH_ON &&
+ def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_DOMAIN_IOAPIC_NONE) {
+ def->features[VIR_DOMAIN_FEATURE_IOAPIC] = VIR_DOMAIN_IOAPIC_QEMU;
+ }
}
diff --git a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
index fa3aaf0d44..5abc40e566 100644
--- a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
+++ b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
@@ -8,9 +8,6 @@
hvm
-
-
-
qemu64