qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syn


From: Damien Hedde
Subject: Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device
Date: Wed, 22 Dec 2021 10:37:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2



On 12/22/21 09:22, Gerd Hoffmann wrote:
On Tue, Dec 21, 2021 at 04:40:28PM +0100, Markus Armbruster wrote:
Paolo Bonzini <pbonzini@redhat.com> writes:

On 12/21/21 13:58, Markus Armbruster wrote:
Is this a regression?  I suspect commit 5dacda5167 "vl: Enable JSON
syntax for -device" (v6.2.0).

Obviously not a regression: everything that used to work still works.

FWIW I think -set should be deprecated.  I'm not aware of any
particularly useful use of it.  There are a couple in the QEMU tests
(in vhost-user-test and in qemu-iotests 068), but in both cases the
code would be easier to follow without; patches can be dusted off if
desired.

-set has its uses, but they're kind of obscure.  When you want to use
some canned configuration with slight modifications, then -readconfig
canned.cfg -set ... is nicer than editing a copy of canned.cfg.

Simliar: configure stuff not supported by libvirt:

   <qemu:commandline>
     <qemu:arg value='-set'/>
     <qemu:arg value='device.video0.guestdebug=1'/>
   </qemu:commandline>

There will always be a gap between qemu and libvirt, even if most of
them are temporary only (while developing a new feature).  I think we
need some way to deal with this kind of tweaks when moving to QAPI-based
machine setup.  Possibly not in qemu, maybe it's easier to add new
'<qemu:set device=... property=... value=...>' syntax to libvirt.

take care,
   Gerd



Can the set feature be handled by libvirt ?
I mean, libvirt could do the merge itself because if I understand it correctly, the snippset just say: please add/override the "guestdebug=1" key/value pair to the 'video0' device command option.

In QAPI, otherwise, we have qom-set, but it will happens after the device has been created, so it don't work for all properties.

--
Damien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]