From cce282fe872882c74c25e124e55762e4b5b79134 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 8 Mar 2017 15:58:26 +0100 Subject: [PATCH] qemuBuildMemoryBackendStr: Check for @memAccess properly 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 --- 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 b30bb670f8..531dc41250 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3371,7 +3371,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 */ -- GitLab