From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Osier Yang <jyang@redhat.com>, Amos Kong <akong@redhat.com>,
laine@redhat.com, libvir-list@redhat.com,
qemu-devel <qemu-devel@nongnu.org>,
rjones@redhat.com, anthony@codemonkey.ws,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] fix/re-do query-command-line-options
Date: Tue, 28 Jan 2014 16:33:28 +0100 [thread overview]
Message-ID: <52E7CDC8.70506@redhat.com> (raw)
In-Reply-To: <87ob2wcha0.fsf@blackfin.pond.sub.org>
Il 28/01/2014 15:28, Markus Armbruster ha scritto:
> I'd rather not promise "all options will take an argument, or desugar
> into some option that takes an argument, forever and ever". But I don't
> see the need for such a promise. If we decide we want such options, we
> just have to do the necessary work to make them visible in
> introspection.
Agreed.
>>> The question is whether we should extend QemuOpts to cover options
>>> without arguments, or change the options without arguments to fit into
>>> existing QemuOpts, e.g. by making them all syntactic sugar for a
>>> suitable QemuOpts-style option.
>>>
>>> If we do the latter, we need to tell customers of command line
>>> introspection to look only for the desugared forms.
>>
>> Yeah.
>
> Documentation job.
>
> However, desugaring the existing options could well be more work than
> extending command line introspection and -readconfig/-writeconfig to
> cover them. Dunno.
Definitely. For example, -watchdog-action could become a -device
option, which is nontrivial to implement.
"git log -p -SDEF\( -- qemu-options.hx" lets you find commits that added
options. The last non-QemuOpts option we added was -sandbox, in 1.2.0,
shortly preceded by -no-user-config and -qtest. So we can also tell
customers of command line introspection "this is the set of non-sugar
non-QemuOpts options as of 1.2".
>> command line introspection QMP introspection
>> | | | |
>> | v | |
>> v QOM introspection <--' |
>> QemuOpts | |
>> introspection v |
>> QAPI introspection <-----------'
>>
>> Makes any sense? :)
>
> What do your arrows mean?
Nothing specific :) Something like "requires".
> Is QemuOpts separate because it needs to be, or just because it exists,
> and nobody can be bothered to fold it into one of the other things?
There is some difference between QemuOpts and the others, in that it's
out of necessity a human-oriented interface---or at least a "more"
human-oriented interface. So the optimistic me says it needs to be.
But I'm not 100% sure.
> I'm can't yet see how making options without arguments visible in
> query-command-line-options increases our compatibility liability, but
> maybe you can enlighten me :)
Maybe there's none.
> Example: description of -smbios, which takes a QemuOpts argument that
> accepts any key=value:
>
> {"option": "smbios", "parameters": []}
>
> Not the order we put them on the wire; I took the liberty to use a more
> readable one.
>
> An option without an argument fits right in, like this:
>
> {"option": "enable-fips"}
Do we know for sure that libvirt or anyone else won't hiccup on the
missing parameters?
> Can we really ignore non-QemuOpts, or do we have to make them sugar for
> QemuOpts so they're visible in QemuOpts introspection?
See above for my answer.
>> QOM/-object is indeed the elephant in the room, but luckily we have
>> enough few users that I believe we can do it if we agree on the right
>> design.
>
> Both QAPI introspection and QOM introspection are obviously valuable
> jobs.
>
> My questions are what is to be done to plug the gaps in command line
> introspection short term, and how command line introspection should work
> long term.
Short term, we definitely have to do something about the mismatches
between option name and QemuOpts group name (boot-opts/smp-opts, resp.
1.0 and 1.6.0). And we have to document all the suboptions in the
QemuOpts schema, with the exceptions of -device, -object (both to be
satisfied with the QOM schema) and -blockdev (QAPI schema). And we have
to provide a way for libvirt to know that query-command-line-options is
reliable.
Long term, I'm not sure we need more introspection than what we have.
But regarding the command line, it would be definitely nice to move more
stuff to QemuOpts, thus making -readconfig more complete.
Paolo
prev parent reply other threads:[~2014-01-28 15:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 2:19 [Qemu-devel] fix/re-do query-command-line-options Amos Kong
2014-01-27 10:24 ` [Qemu-devel] [resend] " Amos Kong
2014-01-27 16:27 ` [Qemu-devel] " Eric Blake
2014-01-28 9:36 ` Markus Armbruster
2014-01-28 10:01 ` Paolo Bonzini
2014-01-28 11:55 ` Markus Armbruster
2014-01-28 12:05 ` Paolo Bonzini
2014-01-28 13:16 ` Markus Armbruster
2014-01-28 13:35 ` Paolo Bonzini
2014-01-28 14:28 ` Markus Armbruster
2014-01-28 15:33 ` Paolo Bonzini [this message]
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=52E7CDC8.70506@redhat.com \
--to=pbonzini@redhat.com \
--cc=akong@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=jyang@redhat.com \
--cc=laine@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
/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).