qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
	aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/7] qemu-option: Fix qemu_opts_set_defaults() for corner cases
Date: Thu, 4 Jul 2013 16:53:11 +0100	[thread overview]
Message-ID: <CAFEAcA_afAR232Qa+prcSoTLjV2Fz51AvsP-9mapXarqFrDORg@mail.gmail.com> (raw)
In-Reply-To: <87zju2xs3i.fsf@blackfin.pond.sub.org>

On 4 July 2013 16:28, Markus Armbruster <armbru@redhat.com> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
>> On the other hand I don't think the old code's behaviour
>> was really right either. I think part of the problem here
>> is that it really makes no sense to specify id= for a
>> QemuOptsList with merge_lists=true -- id= is for distinguishing
>> which of multiple "-whatever id=foo,a=b -whatever id=bar,a=c"
>> sets you want, whereas merge_lists=true is specifying that
>> there should only ever be one set, because they're merged.
>
> Isn't interpreting merge_lists as "there can only be one" stretching it
> a bit?  All it clearly says to me is "merge multiple options with the
> same ID", and that's all the code does.
>
> Merging is merely a syntactic convenience.  Why is that convenience only
> justified for "there can only be one" options, such as -machine?

Well, I think if you have a "can be only one" option then
you might as well turn on merging (as you say it's a syntactic
convenience). If you have an option where id= is mandatory
then you could have merging enabled there; but we don't have
any of those. But for options where id= is allowed but not
mandatory then merging doesn't really work. You don't want
 -device e1000 -device megasas
to merge those two, for instance.

So it just seems like it cuts down the set of combinations
to divide it into:
 * can-be-only-one, merges
 * multiple-allowed, no merging

and I guess it's less confusing for users if there aren't
too many different combinations of behaviour.

> QemuOpts has become unmanagably baroque.

Agreed. This is partly why I'm suggesting cutting down
the possible random combinations (especially where we don't
actually use them).

thanks
-- PMM

  reply	other threads:[~2013-07-04 15:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 13:09 [Qemu-devel] [PATCH 0/7] Fixes around -machine Markus Armbruster
2013-07-04 13:09 ` [Qemu-devel] [PATCH 1/7] qemu-option: Fix qemu_opts_find() for null id arguments Markus Armbruster
2013-07-04 14:40   ` Peter Maydell
2013-07-04 13:09 ` [Qemu-devel] [PATCH 2/7] qemu-option: Fix qemu_opts_set_defaults() for corner cases Markus Armbruster
2013-07-04 14:34   ` Peter Maydell
2013-07-04 15:28     ` Markus Armbruster
2013-07-04 15:53       ` Peter Maydell [this message]
2013-07-04 13:09 ` [Qemu-devel] [PATCH 3/7] vl: New qemu_get_machine_opts() Markus Armbruster
2013-07-04 14:38   ` Peter Maydell
2013-07-04 15:03     ` Markus Armbruster
2013-07-04 15:11       ` Peter Maydell
2013-07-04 16:11         ` Markus Armbruster
2013-07-04 16:46           ` Peter Maydell
2013-07-04 15:14     ` Andreas Färber
2013-07-04 13:09 ` [Qemu-devel] [PATCH 4/7] Fix -machine options accel, kernel_irqchip, kvm_shadow_mem Markus Armbruster
2013-07-04 14:42   ` Peter Maydell
2013-07-04 15:58     ` Markus Armbruster
2013-07-04 16:03       ` Peter Maydell
2013-07-04 16:50         ` Markus Armbruster
2013-07-04 13:09 ` [Qemu-devel] [PATCH 5/7] microblaze: Fix latent bug with default DTB lookup Markus Armbruster
2013-07-10  3:05   ` Peter Crosthwaite
2013-07-04 13:09 ` [Qemu-devel] [PATCH 6/7] Simplify -machine option queries with qemu_get_machine_opts() Markus Armbruster
2013-07-04 13:09 ` [Qemu-devel] [PATCH 7/7] vl: Tighten parsing of -machine option phandle_start Markus Armbruster
2013-07-04 13:31   ` Alexander Graf
2013-07-04 15:01     ` Markus Armbruster
2013-07-04 23:21       ` Alexander Graf
2013-07-10 19:33 ` [Qemu-devel] [PATCH 0/7] Fixes around -machine Anthony Liguori
2013-07-11  6:45   ` Markus Armbruster

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=CAFEAcA_afAR232Qa+prcSoTLjV2Fz51AvsP-9mapXarqFrDORg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=jan.kiszka@siemens.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 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).