[libvirt] [PATCH v3 02/17] qemuBuildMemoryBackendStr: Check for @memAccess properly
Michal Privoznik
mprivozn at redhat.com
Thu Mar 9 16:06:11 UTC 2017
Even though this variable contains just values from an enum where
zero has the usual meaning, it's enum after all and we should
check it as such.
Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
src/qemu/qemu_command.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f145cf9d8..62d3a0a4e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3272,7 +3272,8 @@ qemuBuildMemoryBackendStr(unsigned long long size,
}
/* If none of the following is requested... */
- if (!needHugepage && !userNodeset && !memAccess && !nodeSpecified &&
+ if (!needHugepage && !userNodeset && !nodeSpecified &&
+ memAccess == VIR_DOMAIN_MEMORY_ACCESS_DEFAULT &&
def->mem.source != VIR_DOMAIN_MEMORY_SOURCE_FILE && !force) {
/* report back that using the new backend is not necessary
* to achieve the desired configuration */
--
2.11.0
More information about the libvir-list
mailing list