提交 3a276c65 编写于 作者: J Ján Tomko

conf: split out virDomainIOMMUDefCheckABIStability

上级 a5691448
......@@ -19818,6 +19818,22 @@ virDomainMemoryDefCheckABIStability(virDomainMemoryDefPtr src,
}
static bool
virDomainIOMMUDefCheckABIStability(virDomainIOMMUDefPtr src,
virDomainIOMMUDefPtr dst)
{
if (src->model != dst->model) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target domain IOMMU device model '%s' "
"does not match source '%s'"),
virDomainIOMMUModelTypeToString(dst->model),
virDomainIOMMUModelTypeToString(src->model));
return false;
}
return true;
}
static bool
virDomainDefVcpuCheckAbiStability(virDomainDefPtr src,
virDomainDefPtr dst)
......@@ -20284,14 +20300,8 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr src,
}
if (src->iommu &&
src->iommu->model != dst->iommu->model) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target domain IOMMU device model '%s' "
"does not match source '%s'"),
virDomainIOMMUModelTypeToString(dst->iommu->model),
virDomainIOMMUModelTypeToString(src->iommu->model));
!virDomainIOMMUDefCheckABIStability(src->iommu, dst->iommu))
goto error;
}
/* Coverity is not very happy with this - all dead_error_condition */
#if !STATIC_ANALYSIS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册