All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Hedde <damien.hedde@greensocs.com>
To: Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, MkfsSion <mkfssion@mkfssion.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device
Date: Tue, 21 Dec 2021 18:31:22 +0100	[thread overview]
Message-ID: <f82373b8-6fcc-52a0-45c9-6353f9c43002@greensocs.com> (raw)
In-Reply-To: <871r26ge4z.fsf@dusky.pond.sub.org>



On 12/21/21 16:40, 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.  For
> what it's worth, we have a few cans in docs/config/, and we refer to at
> least one of them in the manual (in docs/system/devices/usb.rst).
> 
> There are a few really good ideas in QemuOpts.  I count -readconfig,
> -writeconfig and -set among them.  Unfortunately, they have been marred
> by us not converting the whole CLI to QemuOpts as envisaged.  And now we
> never will, because our needs have long outgrown what QemuOpts can
> provide.
> 
> I'd love to have unmarred, QAPI-based replacements.  However, I doubt
> maintaining backwards compatibility will be practical and worthwhile.
> 
> Declare these options unstable?
> 
> 
I agree.

Without QemuOpts, and more precisely the ability to alter them before 
they are really handled, this kind of feature will be impossible to have.

Only way I see, is to reverse the mechanism:
+ handle set option before, it store the key,value somewhere
+ an option like -device checks that store and fetch their values.

-- 
Damien


  parent reply	other threads:[~2021-12-21 17:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21  7:18 [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device MkfsSion
2021-12-21 11:26 ` Markus Armbruster
2021-12-21 12:58   ` Markus Armbruster
2021-12-21 14:47     ` Paolo Bonzini
2021-12-21 15:40       ` Markus Armbruster
2021-12-21 17:20         ` Damien Hedde
2021-12-21 17:31         ` Damien Hedde [this message]
2021-12-22  8:22         ` Gerd Hoffmann
2021-12-22  9:37           ` Damien Hedde
2021-12-22 10:47             ` Gerd Hoffmann
2022-01-04 13:14           ` Daniel P. Berrangé
2021-12-22  5:54   ` MkfsSion

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f82373b8-6fcc-52a0-45c9-6353f9c43002@greensocs.com \
    --to=damien.hedde@greensocs.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mkfssion@mkfssion.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.