Bumping minimum version of qemu to 6.2 means that the '-compat' option
is now always supported.
As we were unable to detect it in any other way we based this capability
on QEMU_CAPS_OBJECT_JSON.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 07cdadfd73..2b0e3dd53a 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10339,8 +10339,7 @@ VIR_ENUM_IMPL(qemuCommandDeprecationBehavior,
static void
qemuBuildCompatDeprecatedCommandLine(virCommand *cmd,
virQEMUDriverConfig *cfg,
- virDomainDef *def,
- virQEMUCaps *qemuCaps)
+ virDomainDef *def)
{
g_autoptr(virJSONValue) props = NULL;
g_autofree char *propsstr = NULL;
@@ -10365,13 +10364,6 @@ qemuBuildCompatDeprecatedCommandLine(virCommand *cmd,
if (behavior == QEMU_COMMAND_DEPRECATION_BEHAVIOR_NONE)
return;
- /* we don't try to enable this feature at all if qemu doesn't support it,
- * so that a downgrade of qemu version doesn't impact startup of the VM */
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_COMPAT_DEPRECATED)) {
- VIR_DEBUG("-compat not supported for VM '%s'", def->name);
- return;
- }
-
switch (behavior) {
case QEMU_COMMAND_DEPRECATION_BEHAVIOR_OMIT:
case QEMU_COMMAND_DEPRECATION_BEHAVIOR_NONE:
@@ -10455,7 +10447,7 @@ qemuBuildCommandLine(virDomainObj *vm,
if (qemuBuildNameCommandLine(cmd, cfg, def) < 0)
return NULL;
- qemuBuildCompatDeprecatedCommandLine(cmd, cfg, def, qemuCaps);
+ qemuBuildCompatDeprecatedCommandLine(cmd, cfg, def);
virCommandAddArg(cmd, "-S"); /* freeze CPUs during startup */
--
2.48.1