mirror of https://gitee.com/openkylin/libvirt.git
qemu: Add validation for SMMUv3 IOMMU
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
60f4c41377
commit
fc660ae315
|
@ -6136,6 +6136,20 @@ qemuDomainDeviceDefValidateIOMMU(const virDomainIOMMUDef *iommu,
|
|||
break;
|
||||
|
||||
case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
|
||||
if (!qemuDomainIsARMVirt(def)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("IOMMU device: '%s' is only supported with "
|
||||
"ARM Virt machines"),
|
||||
virDomainIOMMUModelTypeToString(iommu->model));
|
||||
return -1;
|
||||
}
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_VIRT_IOMMU)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("IOMMU device: '%s' is not supported with "
|
||||
"this QEMU binary"),
|
||||
virDomainIOMMUModelTypeToString(iommu->model));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_IOMMU_MODEL_LAST:
|
||||
|
|
Loading…
Reference in New Issue