From: Paolo Bonzini <pbonzini@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>,
"Laszlo Ersek" <lersek@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, marcel.a@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] machine_parse(): list supported machine types in their registration order
Date: Mon, 22 Sep 2014 18:17:09 +0200 [thread overview]
Message-ID: <54204B85.6010406@redhat.com> (raw)
In-Reply-To: <5420491C.8070905@suse.de>
Il 22/09/2014 18:06, Andreas Färber ha scritto:
> Am 22.09.2014 um 17:57 schrieb Paolo Bonzini:
>> Il 22/09/2014 15:15, Laszlo Ersek ha scritto:
>>> $ git grep -E '\<qemu_register(_pc)?_machine\>' | wc -l
>>> 115
>>>
>>> Even if we just count the clusters, they're way too many:
>>>
>>> $ git grep -E '\<machine_init\>' | wc -l
>>> 66
>>
>> There are just a couple of multi-machine clusters (well, three: pseries,
>> pc, q35). So the default clusters can just default to the machine type.
>
> I would've gone even simpler and special-cased pc/q35 and "none" (like
> we did for -cpu "host") in the comparison function, sparing us any big
> interface work.
>
> Therefore from my point of review, this was merely about how we
> implement the comparison function. No reason to get a heart attack IMO.
Yeah, what I'm proposing is something like
MachineClass *a = pa, *b = pb;
cl1 = a->cluster ? a->cluster : object_class_get_name(a);
cl2 = b->cluster ? b->cluster : object_class_get_name(b);
res = strcmp(cl1, cl2);
if (res)
return res;
return strcmp(object_class_get_name(a),
object_class_get_name(b));
Plus a
mc->cluster = qm->cluster;
in vl.c's machine_class_init.
Paolo
next prev parent reply other threads:[~2014-09-22 16:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 11:26 [Qemu-devel] [PATCH 0/2] list supported machine types in their registration order Laszlo Ersek
2014-09-22 11:26 ` [Qemu-devel] [PATCH 1/2] save registration order of machine types Laszlo Ersek
2014-09-22 11:26 ` [Qemu-devel] [PATCH 2/2] machine_parse(): list supported machine types in their registration order Laszlo Ersek
2014-09-22 12:04 ` Andreas Färber
2014-09-22 12:26 ` Michael S. Tsirkin
2014-09-22 12:29 ` Laszlo Ersek
2014-09-22 12:36 ` Michael S. Tsirkin
2014-09-22 12:50 ` Marcel Apfelbaum
2014-09-22 13:43 ` Laszlo Ersek
2014-09-22 15:07 ` Marcel Apfelbaum
2014-09-22 13:15 ` Laszlo Ersek
2014-09-22 15:57 ` Paolo Bonzini
2014-09-22 16:06 ` Andreas Färber
2014-09-22 16:17 ` Paolo Bonzini [this message]
2014-09-22 16:13 ` Laszlo Ersek
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=54204B85.6010406@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=lersek@redhat.com \
--cc=marcel.a@redhat.com \
--cc=mst@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 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.