mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
qemu_validate.c: move NUMA HMAT check to qemuValidateDomainDefNuma()
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
27371bd517
commit
e06c8d6dfd
@ -753,13 +753,22 @@ qemuValidateDomainDefNuma(const virDomainDef *def,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virDomainNumaHasHMAT(def->numa) ||
|
||||
!virQEMUCapsGetMachineNumaMemSupported(qemuCaps,
|
||||
if (!virQEMUCapsGetMachineNumaMemSupported(qemuCaps,
|
||||
def->virtType,
|
||||
def->os.machine)) {
|
||||
needBacking = true;
|
||||
}
|
||||
|
||||
if (virDomainNumaHasHMAT(def->numa)) {
|
||||
needBacking = true;
|
||||
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NUMA_HMAT)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("HMAT is not supported with this QEMU"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (needBacking && !hasMemoryCap) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("NUMA without specified memory backing is not "
|
||||
@ -1068,13 +1077,6 @@ qemuValidateDomainDef(const virDomainDef *def,
|
||||
}
|
||||
}
|
||||
|
||||
if (virDomainNumaHasHMAT(def->numa) &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NUMA_HMAT)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("HMAT is not supported with this QEMU"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (def->genidRequested &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VMGENID)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
|
Loading…
Reference in New Issue
Block a user