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: Michal Privoznik <mprivozn@redhat.com>
virDomainNumaPtr tgt)
{
size_t i;
+ size_t j;
if (virDomainNumaGetNodeCount(src) != virDomainNumaGetNodeCount(tgt)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"match source"), i);
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;