qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "John Snow" <jsnow@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: proposal: deprecate -readconfig/-writeconfig
Date: Fri, 15 May 2020 12:19:43 +0200	[thread overview]
Message-ID: <70499ef0-83a2-b7f2-f69c-fbb3760cf27d@redhat.com> (raw)
In-Reply-To: <877dxdspyk.fsf@dusky.pond.sub.org>

On 15/05/20 07:54, Markus Armbruster wrote:
>> I don't see QemuOpts going away anytime soon, but I do see more QMP/QAPI
>> and less command line in the future as far as management tools are
>> concerned.  QemuOpts and HMP will remain for direct usage, for the
>> foreseeable future.
> 
> I'd prefer not to have two separate configuration infrastructures.

We already have two, since the introduction of preconfig state.  The
question is more how to unify the code that implements them, than how to
reduce them to one.

For example, I can imagine (and have even discussed informally with John
Snow) a patch series that starts by adding a new preconfig command:

{ 'execute': 'set-argv', 'arguments': { 'argv': [ '-m', '2048'] } }

and progressively adds more preconfig commands until Libvirt can
reasonably configure a VM without set-argv.

An example implementation would be to special case chardev-add,
object-add etc. to stash their arguments in a QAPI struct in preconfig
mode, and the same for -chardev and -object.  Then the big ugly setup
code in main() would walk these structs instead of QemuOpts.  Bingo: you
have a QAPI-representable machine config.  It may not be the nicest one
(see the problems you raised in the past about chardev-add not using the
latest and greatest QAPI features) but I would love to see a proof of
concept for this.

Thanks,

Paolo



  reply	other threads:[~2020-05-15 10:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  8:09 proposal: deprecate -readconfig/-writeconfig Paolo Bonzini
2020-05-14  8:54 ` Gerd Hoffmann
2020-05-15  5:31   ` Markus Armbruster
2020-05-14  8:56 ` Daniel P. Berrangé
2020-05-14 12:37   ` Paolo Bonzini
2020-05-15  5:54     ` Markus Armbruster
2020-05-15 10:19       ` Paolo Bonzini [this message]
2020-05-14 14:40   ` John Snow
2020-05-14 15:34     ` Daniel P. Berrangé
2020-05-14 15:51       ` Paolo Bonzini
2020-05-14 15:55         ` Daniel P. Berrangé
2020-05-15  5:44           ` Markus Armbruster
2020-05-15  5:51       ` Markus Armbruster
2020-05-15  9:06     ` Gerd Hoffmann

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=70499ef0-83a2-b7f2-f69c-fbb3760cf27d@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).