Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_validate.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 0f4cb3c983..b5bea4a0ee 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -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",
--
2.26.2