All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: jsnow@redhat.com, "Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: Command line QAPIfication and -readconfig
Date: Wed, 11 Nov 2020 17:39:04 +0100	[thread overview]
Message-ID: <2bc3b857-f197-a03d-efb3-c7ecb1058b81@redhat.com> (raw)
In-Reply-To: <20201111152923.GD3898@merkur.fritz.box>

On 11/11/20 16:29, Kevin Wolf wrote:
> Yes, no question this is doable, it just requires some extra code for
> each option instead of reusing something existing. But it's not too bad
> as QDicts are at least slightly more natural for a QAPI based interface
> than QemuOpts.

Yeah, see the series I posted earlier.  There's some extra code but it's 
fairly well confined.

>> 2) converting to strings is not entirely trivial due to e.g.
>> different spelling between the "-boot" command line option and the
>> "boot-opts" group.
> 
> Hm, where is the difference between both? The QEMU_OPTION_boot case
> seems to just directly parse optarg into "boot-opts" with
> qemu_opts_parse_noisily(), which should be the same as -readconfig does
> with its input, no?

I mean that you could not easily turn

[boot-opts]
	order = "c"

into "-boot order=c" because the "boot-opts" -> "-boot" mapping is not 
written anywhere (except in code of course).

> Even if we queue the -readconfig deprecation only for 6.0, that's still
> fine. I just don't want to discuss one year from now how we should have
> deprecated it long ago.

As usual, the choice will be:

1) deprecate and give a firm removal date, knowing that there won't be a 
replacement ready in time

2) deprecate with no plan to remove; use deprecation to justify breaking 
whatever is too complicated to maintain

3) refactor to keep the code at least readable and as simple as 
possible, desugaring to something completely new and more maintainable

For -set I'm leaning towards (2), keeping only "-set device" working as 
it does have users.  For the rest of vl.c I'm betting on building (3) 
around a core consisting of -blockdev, -netdev, -machine, -object, 
-accel and -device.

Paolo



  reply	other threads:[~2020-11-11 16:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  9:24 Command line QAPIfication and -readconfig Kevin Wolf
2020-11-11 10:14 ` Daniel P. Berrangé
2020-11-11 10:35   ` Kevin Wolf
2020-11-11 11:07     ` Paolo Bonzini
2020-11-11 12:53       ` Kevin Wolf
2020-11-11 13:06         ` Paolo Bonzini
2020-11-11 15:29           ` Kevin Wolf
2020-11-11 16:39             ` Paolo Bonzini [this message]
2020-11-12 14:14     ` Andrea Bolognani

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=2bc3b857-f197-a03d-efb3-c7ecb1058b81@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@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.