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

2022-01-04 Thread Daniel P . Berrangé
On Wed, Dec 22, 2021 at 09:22:47AM +0100, Gerd Hoffmann wrote: > On Tue, Dec 21, 2021 at 04:40:28PM +0100, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > > > On 12/21/21 13:58, Markus Armbruster wrote: > > >>> Is this a regression? I suspect commit 5dacda5167 "vl: Enable JSON > > >>> s

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

2021-12-22 Thread Gerd Hoffmann
Hi, > > Simliar: configure stuff not supported by libvirt: > > > > > > > > > > > > > > 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

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

2021-12-22 Thread Damien Hedde
On 12/22/21 09:22, Gerd Hoffmann wrote: On Tue, Dec 21, 2021 at 04:40:28PM +0100, Markus Armbruster wrote: Paolo Bonzini 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

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

2021-12-22 Thread Gerd Hoffmann
On Tue, Dec 21, 2021 at 04:40:28PM +0100, Markus Armbruster wrote: > Paolo Bonzini 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: everyth

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

2021-12-21 Thread MkfsSion
On 2021/12/21 19:26, Markus Armbruster wrote:> Two issues, and only looks fixable. > > -device accepts either a QemuOpts or a JSON argument. > > It parses the former with qemu_opts_parse_noisily() into a QemuOpt > stored in @qemu_device_opts. > > It parses the latter with qobject_from_json() in

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

2021-12-21 Thread Damien Hedde
On 12/21/21 16:40, Markus Armbruster wrote: Paolo Bonzini 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 t

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

2021-12-21 Thread Damien Hedde
On 12/21/21 16:40, Markus Armbruster wrote: Paolo Bonzini 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 t

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

2021-12-21 Thread Markus Armbruster
Paolo Bonzini 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

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

2021-12-21 Thread Paolo Bonzini
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 usefu

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

2021-12-21 Thread MkfsSion
When using JSON syntax for -device, -set option can not find device specified in JSON by id field. The following commandline is an example: $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 qemu-system-x86_64: -set device.foo.bar=1: there is no device "foo" defined The patch adds

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

2021-12-21 Thread Markus Armbruster
Markus Armbruster writes: > MkfsSion writes: > >> When using JSON syntax for -device, -set option can not find device >> specified in JSON by id field. The following commandline is an example: >> >> $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 >> qemu-system-x86_64: -set dev

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

2021-12-21 Thread Markus Armbruster
MkfsSion writes: > When using JSON syntax for -device, -set option can not find device > specified in JSON by id field. The following commandline is an example: > > $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 > qemu-system-x86_64: -set device.foo.bar=1: there is no device "f