From 3c508e7d4310aeb8c65076017c90569cc4b9ea55 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 3 Jan 2023 09:51:33 +0100 Subject: [PATCH] qemu: capabilities: Introduce QEMU_CAPS_MACHINE_HPET capability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The capability represents that qemu accepts the configuration of the HPET timer via -machine hpet=on/off rather than the soon-to-be-deprecated '-no-hpet' option. The capability is detected from 'query-command-line-options' which recently added the 'hpet' option. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Thomas Huth --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml | 1 + 3 files changed, 8 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3aba9299b1..7df68f85a1 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -680,6 +680,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "sgx-epc", /* QEMU_CAPS_SGX_EPC */ "thread-context", /* QEMU_CAPS_THREAD_CONTEXT */ "screenshot-format-png", /* QEMU_CAPS_SCREENSHOT_FORMAT_PNG */ + + /* 440 */ + "machine-hpet", /* QEMU_CAPS_MACHINE_HPET */ ); @@ -3283,6 +3286,7 @@ struct virQEMUCapsCommandLineProps { * features should be used if possible. */ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { { "fsdev", "multidevs", QEMU_CAPS_FSDEV_MULTIDEVS }, + { "machine", "hpet", QEMU_CAPS_MACHINE_HPET }, { "sandbox", NULL, QEMU_CAPS_SECCOMP_SANDBOX }, { "spice", NULL, QEMU_CAPS_SPICE }, { "spice", "gl", QEMU_CAPS_SPICE_GL }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index cc8b3759ea..9e90d8badf 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -660,6 +660,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_THREAD_CONTEXT, /* -object thread-context */ QEMU_CAPS_SCREENSHOT_FORMAT_PNG, /* screendump command supports png format */ + /* 440 */ + QEMU_CAPS_MACHINE_HPET, /* the HPET timer is configured via -machine, rather than -no-hpet */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml index e7ac47e7da..31dc03a780 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml @@ -201,6 +201,7 @@ + 7002050 0 43100244