qemu: Always assume QEMU_CAPS_MEM_MERGE

Supported since qemu commit 8490fc78e7 ("add -machine mem-merge=on|off
option") released in qemu-v1.3.0 and can't be compiled out.

Assume that it's present and remove the validation code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-08-09 14:56:11 +02:00
parent 0d41080701
commit db817385e8
2 changed files with 1 additions and 8 deletions

View File

@ -757,13 +757,6 @@ qemuValidateDomainDefMemory(const virDomainDef *def,
return -1;
}
if (mem->nosharepages && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEM_MERGE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("disable shared memory is not available "
"with this QEMU binary"));
return -1;
}
return 0;
}

View File

@ -1291,7 +1291,7 @@ mymain(void)
QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST_CAPS_LATEST("hugepages-memaccess3");
DO_TEST_CAPS_LATEST("hugepages-nvdimm");
DO_TEST("nosharepages", QEMU_CAPS_MEM_MERGE);
DO_TEST_NOCAPS("nosharepages");
DO_TEST_NOCAPS("disk-cdrom");
DO_TEST_CAPS_VER("disk-cdrom", "2.12.0");
DO_TEST_CAPS_LATEST("disk-cdrom");