To keep the internal data structure consistent.
---
src/qemu/qemu_driver.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d74bf52..955744a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7585,6 +7585,8 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
}
vm->def->numatune.memory.nodemask = nodeset;
+ vm->def->numatune.memory.placement_mode =
+ VIR_DOMAIN_NUMATUNE_MEM_PLACEMENT_MODE_STATIC;
}
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
@@ -7601,11 +7603,16 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
}
persistentDef->numatune.memory.nodemask = nodeset;
+ persistentDef->numatune.memory.placement_mode =
+ VIR_DOMAIN_NUMATUNE_MEM_PLACEMENT_MODE_STATIC;
}
}
}
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
+ if (!persistentDef->numatune.memory.placement_mode)
+ persistentDef->numatune.memory.placement_mode =
+ VIR_DOMAIN_NUMATUNE_MEM_PLACEMENT_MODE_AUTO;
if (virDomainSaveConfig(driver->configDir, persistentDef) < 0)
ret = -1;
}
--
1.7.7.3