mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
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: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7edcbd02aa
commit
a9ab2abbf6
@ -1074,6 +1074,7 @@ virDomainNumaCheckABIStability(virDomainNumaPtr src,
|
||||
virDomainNumaPtr tgt)
|
||||
{
|
||||
size_t i;
|
||||
size_t j;
|
||||
|
||||
if (virDomainNumaGetNodeCount(src) != virDomainNumaGetNodeCount(tgt)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
@ -1102,6 +1103,17 @@ virDomainNumaCheckABIStability(virDomainNumaPtr src,
|
||||
"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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user