mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: validate IOMMU interrupt remapping setting
This option requires: <ioapic driver='qemu'/> Report an error in case someone tries to combine it with different ioapic setting. Setting 'eim' on without enabling 'intremap' does not make sense. https://bugzilla.redhat.com/show_bug.cgi?id=1457610
This commit is contained in:
parent
190a5bc127
commit
90cd99a42e
@ -5575,6 +5575,24 @@ virDomainDefValidateInternal(const virDomainDef *def)
|
||||
if (virDomainDefGetVcpusTopology(def, NULL) < 0)
|
||||
return -1;
|
||||
|
||||
if (def->iommu &&
|
||||
def->iommu->intremap == VIR_TRISTATE_SWITCH_ON &&
|
||||
(def->features[VIR_DOMAIN_FEATURE_IOAPIC] != VIR_TRISTATE_SWITCH_ON ||
|
||||
def->ioapic != VIR_DOMAIN_IOAPIC_QEMU)) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("IOMMU interrupt remapping requires split I/O APIC "
|
||||
"(ioapic driver='qemu')"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (def->iommu &&
|
||||
def->iommu->eim == VIR_TRISTATE_SWITCH_ON &&
|
||||
def->iommu->intremap != VIR_TRISTATE_SWITCH_ON) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("IOMMU eim requires interrupt remapping to be enabled"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user