From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Glauber Costa <glommer@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v2 2/2] basic machine opts framework
Date: Thu, 03 Jun 2010 08:11:18 -0500 [thread overview]
Message-ID: <4C07A9F6.9060200@linux.vnet.ibm.com> (raw)
In-Reply-To: <4C074689.6080106@web.de>
On 06/03/2010 01:07 AM, Jan Kiszka wrote:
> Glauber Costa wrote:
>
>> On Wed, Jun 02, 2010 at 09:15:10AM +0200, Jan Kiszka wrote:
>>
>>>>
>>>> +QemuOptsList qemu_machine_opts = {
>>>> + .name = "M",
>>>> + .head = QTAILQ_HEAD_INITIALIZER(qemu_machine_opts.head),
>>>> + .desc = {
>>>> + {
>>>> + .name = "mach",
>>>> + .type = QEMU_OPT_STRING,
>>>> + },{
>>>> + .name = "irqchip",
>>>> + .type = QEMU_OPT_STRING,
>>>> + },
>>>>
>>> Can't we make the concrete machine define what options it needs? Pushing
>>> this into the generic code may soon end up in a bunch of very special
>>> switches that are unused on most machines or even have no meaning for them.
>>>
>>> Also, I would suggest to introduce the generic part first, and then add
>>> first users like the x86 irqchip.
>>>
>> Yeah, in general, I do agree with you.
>>
>> Me and anthony talked about it for a while some time ago, and more or less
>> concluded that it could be possible to avoid that, putting a little think
>> which options to add.
>>
>> the "irqchip" option, if you note, is not x86-specific, in any case.
>> Any machine has an irqchip.
>>
> ...but the majority has no choice among different models. This option
> simply makes only sense for x86 now and in the foreseeable future.
>
>
>> The first idea was to use something like
>> "apic=in_kernel|userspace" which would be, that, very x86-centric.
>>
>> So, since letting machines define their own options adds complexity,
>> my take would be to add those common options, and add infrastructure
>> for machine-specific options when we see something that makes it
>> unavoidable.
>>
>> What do you think?
>>
>>
> I have no general concerns if you document irqchip as a x86-only machine
> option without effect on other machines and you promise to clean this up
> once done with in-kernel irqchip support (which is clearly more
> important). But the current design should not stay that way for a longer
> period to avoid what I sketched above.
>
What I think we need to do is actually use an empty QemuOptsList for the
-machine option, make sure that the driver is present, then re-validate
the list with a QemuOptsList that's included in the machine state.
We should, of course, have a #define of MACHINE_COMMON_OPTS. This would
allow machine specific options (like irqchip). I don't think irqchip is
the best name really. I think it should be apic=kernel|user.
Regards,
Anthony Liguori
> Jan
>
next prev parent reply other threads:[~2010-06-03 13:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 17:56 [Qemu-devel] [PATCH v2 0/2] basic machine opts framework Glauber Costa
2010-06-01 17:56 ` [Qemu-devel] [PATCH v2 1/2] early set current_machine Glauber Costa
2010-06-01 17:56 ` [Qemu-devel] [PATCH v2 2/2] basic machine opts framework Glauber Costa
2010-06-02 7:15 ` [Qemu-devel] " Jan Kiszka
2010-06-02 14:06 ` Glauber Costa
2010-06-03 6:07 ` Jan Kiszka
2010-06-03 13:11 ` Anthony Liguori [this message]
2010-06-03 9:02 ` Paul Brook
2010-06-03 14:13 ` Anthony Liguori
2010-06-03 13:14 ` [Qemu-devel] Re: [PATCH v2 1/2] early set current_machine Anthony Liguori
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=4C07A9F6.9060200@linux.vnet.ibm.com \
--to=aliguori@linux.vnet.ibm.com \
--cc=glommer@redhat.com \
--cc=jan.kiszka@web.de \
--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).