All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org
Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: [Qemu-devel] [RFC] Machine description as data
Date: Fri, 13 Feb 2009 13:48:10 +0100	[thread overview]
Message-ID: <87ocx6pkol.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <200902131206.42427.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org> (Paul Brook's message of "Fri\, 13 Feb 2009 12\:06\:41 +0000")

Paul Brook <paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org> writes:

>> Now let's examine how QEMU machine configuration and FDT machine
>> descriptions for kernels are related.
>>
>> In a way, both can be regarded as copies of a complete machine
>> description with lots of stuff pruned.  Except the complete machine
>> description doesn't exist.  Because there is no use for it.
>>
>> FDT routinely prunes stuff like PCI and USB devices, because those are
>> better probed.
>>
>> QEMU configuration should certainly prune everything that is not
>> actually configurable.
>
> I'm not sure I agree here, or at least we may be talking past each other.

That could be my fault; I guess I didn't express myself clearly.  What
"configurable" means depends on your point of view.

One point of view is assembling pieces of QEMU functionality into a
virtual machine type.  You call that "machine config" below.

Another point of view is configuring a specific virtual machine, based
on a virtual machine type.  I think you call that "user config" below.

In my view, we start with static machine configuration, which we then
modify according to the user's wishes.  The result then drives the
construction of the virtual machine.

My prototype has the static machine configuration compiled in, but I
think it belongs in a config file.

A config file would also be convenient for users.  I guess we'll also
want to support existing command line options, at least for some time.

I'm arguing that both the static machine configuration and the final
configuration (after user config is edited in) lack stuff that needs to
be put into the FDT for the kernel.

Hypothetical example: say the kernel needs to know exactly how the
interrupts are wired.  But QEMU can wire the interrupts just one way,
the way it has always wired them.  What's the point in putting that way
into the machine configuration?  Verifying that whatever is there
matches reality is no less work than generating the information from
scratch, isn't it?

> IMHO the machine config should specify all the bits of the machine that don't 
> really want to be exposed to the average user. e.g. the memory layout and 
> interrupt routings, etc. We then have a seaparate user config file (possibly 
> structured differently) which exposes things like host bindings for disks and 
> network devices.
>
> It's all a bit muddy because the current commandline options effect both the 
> devices present and the host bindings for the corresponding interfaces. While 
> this seems like a good idea to start with, I'm not convinced this is actually 
> a desirable feature.  Certainly for embedded machines you want a fixed set of 
> hardware. e.g. if we have a SoC with 3 UARTs we should always create those 3 
> devices, and it's not meaningful to have more. If the user doesn't specify 
> sufficient -serial options then the remainder just get connected 
> to /dev/null. Likewise there's a good argument for having the vlan and disc 
> configuration be separate from creation of the NIC/HBA devices.
>
> One possibility is that it might actually make more sense to specify 
> hot-pluggable devices (e.g. PCI and USB) in a sumilar way that they would be 
> added at runtime, rather than trying to force them into a static tree.
>
> My implementation focsed on just the machine config, mostly ignoring the user 
> config and host bindings.
>
> Paul

I'm still reading your code.  It would help if you could provide a
Makefile patch that let me actually build it.

My initial impression is that we both approached the problem from
different directions, yet converged on fairly similar solutions.  Each
of us covers stuff the other glossed over.  More later.

  parent reply	other threads:[~2009-02-13 12:48 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87iqnh6kyv.fsf@pike.pond.sub.org>
     [not found] ` <87iqnh6kyv.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-11 18:50   ` [Qemu-devel] [RFC] Machine description as data Hollis Blanchard
2009-02-11 19:34     ` Blue Swirl
     [not found]     ` <1234378228.28751.79.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-02-12  4:01       ` [Qemu-devel] " David Gibson
2009-02-12 10:26         ` Markus Armbruster
2009-02-12 12:49           ` Carl-Daniel Hailfinger
2009-02-12 16:46             ` M. Warner Losh
2009-02-12 18:29               ` Markus Armbruster
2009-02-12 23:58                 ` Carl-Daniel Hailfinger
     [not found]                   ` <4994B7B6.80805-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13 11:19                     ` [Qemu-devel] " Markus Armbruster
     [not found]                 ` <87prhnwltz.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13  1:05                   ` David Gibson
2009-02-12 23:35               ` Carl-Daniel Hailfinger
2009-02-12 23:58                 ` Paul Brook
     [not found]                   ` <200902122358.25864.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13  0:32                     ` [Qemu-devel] " Carl-Daniel Hailfinger
2009-02-13  0:47                       ` Jamie Lokier
     [not found]                       ` <4994BF93.2070409-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  1:46                         ` [Qemu-devel] " David Gibson
2009-02-13 14:32                       ` Lennart Sorensen
     [not found]                 ` <4994B22E.6060608-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  0:05                   ` [Qemu-devel] " M. Warner Losh
     [not found]           ` <87iqng0x3t.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-12 17:52             ` Hollis Blanchard
     [not found]               ` <1234461162.20305.16.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-02-12 18:53                 ` Markus Armbruster
     [not found]                   ` <87fxijwkpn.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-12 19:33                     ` Mitch Bradley
     [not found]                       ` <499479A7.5090902-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2009-02-13  0:59                         ` David Gibson
2009-02-13  1:00                 ` David Gibson
2009-02-13  0:43             ` David Gibson
     [not found]               ` <20090213004305.GB8104-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13  2:11                 ` Carl-Daniel Hailfinger
     [not found]                   ` <4994D6C8.5050004-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  2:17                     ` David Gibson
     [not found]                       ` <20090213021704.GA10476-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13  2:45                         ` DTS syntax and DTC patches (was: Re: [Qemu-devel] [RFC] Machine description as data) Carl-Daniel Hailfinger
     [not found]                           ` <4994DED9.6020803-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  2:51                             ` David Gibson
     [not found]                               ` <20090213025101.GC10476-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13 17:07                                 ` [coreboot] " ron minnich
     [not found]                               ` <13426df10902130907m5c3452dpb8f4f2b72f8507b9@mail.gmail.com>
     [not found]                                 ` <13426df10902130907m5c3452dpb8f4f2b72f8507b9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-20  2:29                                   ` David Gibson
     [not found]                                     ` <20090220022918.GA18332-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-20  3:32                                       ` ron minnich
2009-02-13 20:04                     ` [Qemu-devel] [RFC] Machine description as data Jon Loeliger
2009-02-13 20:15                       ` Carl-Daniel Hailfinger
     [not found]                         ` <4995D4EE.8030703-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13 20:19                           ` Jon Loeliger
2009-02-12 10:26     ` Markus Armbruster
2009-02-12 12:36       ` Carl-Daniel Hailfinger
     [not found]       ` <87k57w0x4r.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13  0:37         ` [Qemu-devel] " David Gibson
     [not found]           ` <20090213003724.GA8104-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13 11:26             ` Markus Armbruster
     [not found]               ` <87ab8qr317.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 12:06                 ` Paul Brook
     [not found]                   ` <200902131206.42427.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13 12:48                     ` Markus Armbruster [this message]
     [not found]                       ` <87ocx6pkol.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 13:33                         ` Paul Brook
     [not found]                           ` <200902131333.47141.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13 14:13                             ` Markus Armbruster
     [not found]                               ` <871vu2pgq7.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 14:25                                 ` Paul Brook
     [not found]                                   ` <200902131425.53137.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13 15:47                                     ` Jamie Lokier
2009-02-13 18:36                                 ` Mitch Bradley
     [not found]                                   ` <4995BDC0.3040806-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2009-02-13 19:49                                     ` Markus Armbruster
     [not found]                                       ` <877i3uglqz.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 19:51                                         ` Mitch Bradley
2009-02-16  3:42                 ` David Gibson
     [not found]                   ` <20090216034214.GB9772-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-16 16:39                     ` Markus Armbruster
     [not found]                       ` <87iqnawd2r.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-17  3:29                         ` David Gibson
     [not found]                           ` <20090217032909.GA29225-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-17  7:54                             ` Markus Armbruster
2009-02-17 17:44                             ` Paul Brook
     [not found]                               ` <200902171744.34951.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-18  8:36                                 ` Markus Armbruster
     [not found] ` <18834.64870.951989.714873@mariner.uk.xensource.com>
     [not found]   ` <18834.64870.951989.714873-msK/Ju9w1zmnROeE8kUsYhEHtJm+Wo+I@public.gmane.org>
2009-02-11 18:57     ` Hollis Blanchard
     [not found]       ` <1234378639.28751.85.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-02-12  3:50         ` David Gibson

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=87ocx6pkol.fsf@pike.pond.sub.org \
    --to=armbru-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.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.