[PATCH] src: stop using deprecated syntax for hv-crash argument

Daniel P. Berrangé via Devel posted 1 patch 5 days, 13 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20260908144653.443068-1-berrange@redhat.com
src/qemu/qemu_command.c                               | 2 +-
tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args | 2 +-
tests/qemuxmlconfdata/panic-double.x86_64-latest.args | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
[PATCH] src: stop using deprecated syntax for hv-crash argument
Posted by Daniel P. Berrangé via Devel 5 days, 13 hours ago
From: Daniel P. Berrangé <berrange@redhat.com>

QEMU historically accepted bare keywords as a short-cut for turning on
a boolean option. This was deprecated quite a long time ago and most
usage would trigger a warning from QEMU, but the -cpu arg is special
and doesn't warn.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/qemu/qemu_command.c                               | 2 +-
 tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args | 2 +-
 tests/qemuxmlconfdata/panic-double.x86_64-latest.args | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index a07b915f4d..bcddb9c922 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6748,7 +6748,7 @@ qemuBuildCpuCommandLine(virCommand *cmd,
 
     for (i = 0; i < def->npanics; i++) {
         if (def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_HYPERV) {
-            virBufferAddLit(&buf, ",hv-crash");
+            virBufferAddLit(&buf, ",hv-crash=on");
             break;
         }
     }
diff --git a/tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args b/tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args
index ee0f8551c2..0182cc8e18 100644
--- a/tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args
+++ b/tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
 -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \
 -accel tcg \
--cpu qemu64,hv-crash \
+-cpu qemu64,hv-crash=on \
 -m size=219136k \
 -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
diff --git a/tests/qemuxmlconfdata/panic-double.x86_64-latest.args b/tests/qemuxmlconfdata/panic-double.x86_64-latest.args
index 9c5b3a7694..21ecaf4d84 100644
--- a/tests/qemuxmlconfdata/panic-double.x86_64-latest.args
+++ b/tests/qemuxmlconfdata/panic-double.x86_64-latest.args
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
 -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \
 -accel tcg \
--cpu qemu64,hv-crash \
+-cpu qemu64,hv-crash=on \
 -m size=219136k \
 -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
-- 
2.55.0

Re: [PATCH] src: stop using deprecated syntax for hv-crash argument
Posted by Peter Krempa via Devel 5 days, 12 hours ago
On Tue, Sep 08, 2026 at 15:46:53 +0100, Daniel P. Berrangé via Devel wrote:
> From: Daniel P. Berrangé <berrange@redhat.com>
> 
> QEMU historically accepted bare keywords as a short-cut for turning on
> a boolean option. This was deprecated quite a long time ago and most
> usage would trigger a warning from QEMU, but the -cpu arg is special
> and doesn't warn.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/qemu/qemu_command.c                               | 2 +-
>  tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args | 2 +-
>  tests/qemuxmlconfdata/panic-double.x86_64-latest.args | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Re: [PATCH] src: stop using deprecated syntax for hv-crash argument
Posted by Peter Krempa via Devel 5 days, 12 hours ago
In subject/summary:

s/src/qemu/

On Tue, Sep 08, 2026 at 17:17:59 +0200, Peter Krempa via Devel wrote:
> On Tue, Sep 08, 2026 at 15:46:53 +0100, Daniel P. Berrangé via Devel wrote:
> > From: Daniel P. Berrangé <berrange@redhat.com>
> > 
> > QEMU historically accepted bare keywords as a short-cut for turning on
> > a boolean option. This was deprecated quite a long time ago and most
> > usage would trigger a warning from QEMU, but the -cpu arg is special
> > and doesn't warn.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  src/qemu/qemu_command.c                               | 2 +-
> >  tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args | 2 +-
> >  tests/qemuxmlconfdata/panic-double.x86_64-latest.args | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
> 
Re: [PATCH] src: stop using deprecated syntax for hv-crash argument
Posted by Daniel P. Berrangé via Devel 5 days, 12 hours ago
On Tue, Sep 08, 2026 at 05:21:01PM +0200, Peter Krempa wrote:
> In subject/summary:
> 
> s/src/qemu/

Sorry, too late seeing this, by 3 seconds !

> 
> On Tue, Sep 08, 2026 at 17:17:59 +0200, Peter Krempa via Devel wrote:
> > On Tue, Sep 08, 2026 at 15:46:53 +0100, Daniel P. Berrangé via Devel wrote:
> > > From: Daniel P. Berrangé <berrange@redhat.com>
> > > 
> > > QEMU historically accepted bare keywords as a short-cut for turning on
> > > a boolean option. This was deprecated quite a long time ago and most
> > > usage would trigger a warning from QEMU, but the -cpu arg is special
> > > and doesn't warn.
> > > 
> > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > > ---
> > >  src/qemu/qemu_command.c                               | 2 +-
> > >  tests/qemuxmlconfdata/hyperv-panic.x86_64-latest.args | 2 +-
> > >  tests/qemuxmlconfdata/panic-double.x86_64-latest.args | 2 +-
> > >  3 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > Reviewed-by: Peter Krempa <pkrempa@redhat.com>
> > 
> 

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|