提交 a9ab2abb 编写于 作者: M Michal Privoznik

conf: Check for NUMA distances in validity check

NUMA distances are part of guest ABI (guests can read it
directly!) and therefore as such shouldn't change throughout the
lifetime of domain.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 7edcbd02
...@@ -1074,6 +1074,7 @@ virDomainNumaCheckABIStability(virDomainNumaPtr src, ...@@ -1074,6 +1074,7 @@ virDomainNumaCheckABIStability(virDomainNumaPtr src,
virDomainNumaPtr tgt) virDomainNumaPtr tgt)
{ {
size_t i; size_t i;
size_t j;
if (virDomainNumaGetNodeCount(src) != virDomainNumaGetNodeCount(tgt)) { if (virDomainNumaGetNodeCount(src) != virDomainNumaGetNodeCount(tgt)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
...@@ -1102,6 +1103,17 @@ virDomainNumaCheckABIStability(virDomainNumaPtr src, ...@@ -1102,6 +1103,17 @@ virDomainNumaCheckABIStability(virDomainNumaPtr src,
"match source"), i); "match source"), i);
return false; return false;
} }
for (j = 0; j < virDomainNumaGetNodeCount(src); j++) {
if (virDomainNumaGetNodeDistance(src, i, j) !=
virDomainNumaGetNodeDistance(tgt, i, j)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target NUMA distance from %zu to %zu "
"doesn't match source"), i, j);
return false;
}
}
} }
return true; return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册