]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: capabilities: Add alternative detection of QEMU_CAPS_NUMA
authorPeter Krempa <pkrempa@redhat.com>
Tue, 10 Aug 2021 14:28:15 +0000 (16:28 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 18 Aug 2021 07:58:11 +0000 (09:58 +0200)
'set-numa-node' is the command which can set the equivalent parameters
to '-numa' in preconfig mode, so we can use it as witness to see that
-numa is supported.

To ensure that the old detection method is removed once we'll be bumping
qemu support add a comment with the appropriate version check.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_capabilities.c

index 9c915229ca75cf86c27cbd467b6eae3dcb49f9e6..2d680a83986a7586c6fa051bcc0906c77015325d 100644 (file)
@@ -1183,6 +1183,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
     { "block-export-add", QEMU_CAPS_BLOCK_EXPORT_ADD },
     { "query-display-options", QEMU_CAPS_QUERY_DISPLAY_OPTIONS },
     { "blockdev-reopen", QEMU_CAPS_BLOCKDEV_REOPEN },
+    { "set-numa-node", QEMU_CAPS_NUMA },
 };
 
 struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
@@ -3247,7 +3248,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
     { "msg", "timestamp", QEMU_CAPS_MSG_TIMESTAMP },
     { "name", "debug-threads", QEMU_CAPS_NAME_DEBUG_THREADS },
     { "name", "guest", QEMU_CAPS_NAME_GUEST },
-    { "numa", NULL, QEMU_CAPS_NUMA },
+    { "numa", NULL, QEMU_CAPS_NUMA }, /* not needed after qemuCaps->version < 3000000 */
     { "overcommit", NULL, QEMU_CAPS_OVERCOMMIT },
     { "sandbox", "enable", QEMU_CAPS_SECCOMP_SANDBOX },
     { "sandbox", "elevateprivileges", QEMU_CAPS_SECCOMP_BLACKLIST },