From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Glauber Costa <glommer@redhat.com>,
Paul Brook <paul@codesourcery.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 0/22] Refactor machine support
Date: Tue, 08 Jun 2010 11:15:46 -0500 [thread overview]
Message-ID: <4C0E6CB2.20507@codemonkey.ws> (raw)
In-Reply-To: <4C0E6894.9000901@redhat.com>
On 06/08/2010 10:58 AM, Paolo Bonzini wrote:
> On 06/08/2010 05:36 PM, Paul Brook wrote:
>>>> Once you eliminate machine_register_core that knowledge has
>>>>
>>>> somehow got to come from your device tree description file. Having a
>>>> single device tree that can morph into significantly different
>>>> machines
>>>> seems like unnecessary complexity given this is a user-specified file.
>>>
>>> 99% of qemu users will never touch a device tree. The practical matter
>>> is, we're going to have to provide higher level interfaces that allow a
>>> user to significantly morph a base device tree into something
>>> different.
>>
>> That's the bit I don't get. Why are we significantly morphing a base
>> device
>> tree? Surely it's easier to just use a different base tree.
>
> Because at some point the base tree will have to be written in C. Of
> course you have to decide where to stop allowing customization, but
> anyway it will be significantly more complex than a QemuOpts config
> file. QemuOpts obviously doesn't have the flexibility to create an
> entire device tree.
>
> Want to let the user add an IDE controller? Fine, you need to provide
> him with a way of writing the following logic:
>
> for(i = 0; i < MAX_IDE_BUS * MAX_IDE_DEVS; i++) {
> hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS);
> }
> pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
>
> What do you do? Invent your own language (another YaST? no thanks)?
> Massive refactoring of QEMU's bowels (cannot solve all the problems,
> Anthony gave more examples in the email I replied to)? Keep C code
> (then you're not doing anything different than what Anthony's
> MachineCore is doing)?
Or punt all of the complexity to the user such that have to manually
figure out where in the device tree a drive has to be inserted. That's
not really reasonable IMHO.
> I think there are four choices:
>
> 1) only merge the first 5-7 patches of the series, basically up to the
> creation of -machine and conversion of -kernel/-initrd/-M/-m. This is
> also what is needed for KVM's irqchip. Think about some other smart
> way to implement default devices.
Or don't declare MachineCore options stable across releases. I concur
that we probably don't want to support some of these interfaces long
term but I think we can pretty quickly figure out some better interfaces.
The advantage of a full conversion is that it allows us to focus on
improving the interfaces since we'll have the architecture in place.
> 2) do not expose some things to the config files. This requires
> implementing an additional QemuOpts feature for internal options, plus
> the current patchset. It means that moving machine types out to
> config files is not possible.
I dislike having internal only options as it means we have to keep
things within qemu. For things like max_cpus, I think we just need to
validate that we've got passed sane values. Setting max_cpus in a
global config is actually a really useful thing for downstreams to do
since they are all having a fixed support statement of X VCPUs per VM.
> 3) put some things into an implementation-dependent namespace, i.e.
> __pci or __default_device or __serial. In the future it's possible to
> these things in config files, just nobody has to worry about users
> relying on them and can refactor to death. This is the current
> patchset plus some search and replace, and is my favorite.
Yeah, I'm good with being explicit. I'd prefer x-pci or x-serial since
we've already established that as the experimential namespace.
> 4) expose everything to the user, at the cost of regretting it later.
> This is the current patchset.
>
>
> One "smart way to implement default devices" could be an inclusion
> mechanism where a machine can ask qemu to read other config files.
> Then you'd have config files for the default serial/parallel/etc.
> This could also be implemented on top of choices 2/3/4 though.
Default devices are a real pain. Fortunately, we only mess with it in
s390 so I'm fairly certain we can simplify things considerable. It's
just not something I wanted to tackle in this series.
Regards,
Anthony Liguori
> Paolo
next prev parent reply other threads:[~2010-06-08 16:15 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 23:51 [Qemu-devel] [PATCH 0/22] Refactor machine support Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 01/22] QemuOpts: fix a bug in QemuOpts when setting an option twice Anthony Liguori
2010-06-08 7:51 ` Gerd Hoffmann
2010-06-08 10:32 ` [Qemu-devel] " Paolo Bonzini
2010-06-08 13:07 ` Anthony Liguori
2010-06-08 13:44 ` Gerd Hoffmann
2010-06-08 15:17 ` Anthony Liguori
2010-06-08 15:37 ` Gerd Hoffmann
2010-06-08 16:04 ` Anthony Liguori
2010-06-09 7:01 ` Gerd Hoffmann
2010-06-08 14:38 ` Paul Brook
2010-06-08 15:14 ` Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 02/22] QemuOpts: make qemu_opts_validate() store the description list for later use Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 03/22] QemuOpts: add function to set QemuOpts from defaults Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 04/22] machine: package all init arguments into a QemuOpts (v2) Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 05/22] machine: pass all init options as a single QemuOpts Anthony Liguori
2010-06-08 7:58 ` Gerd Hoffmann
2010-06-07 23:51 ` [Qemu-devel] [PATCH 06/22] Make -acpi-enable a machine specific option Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 07/22] machine: introduce -machine option Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 08/22] machine: implement -kernel/-append/-initrd options in term of -machine Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 09/22] machine: implement -m in terms " Anthony Liguori
2010-06-07 23:51 ` [Qemu-devel] [PATCH 10/22] machine: allow boards to specify default values and use it in isapc Anthony Liguori
2010-06-08 8:03 ` Gerd Hoffmann
2010-06-08 13:09 ` Anthony Liguori
2010-06-08 13:29 ` Gerd Hoffmann
2010-06-07 23:51 ` [Qemu-devel] [PATCH 11/22] machine: replace compat_props with opts_default Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 12/22] machine: some sugary macros to simplify machine default options Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 13/22] machine: get rid of global default QEMUMachine members Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 14/22] machine: replace QEMUMachine.use_scsi with -machine default_drive Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 15/22] machine: make max_cpus a -machine option Anthony Liguori
2010-06-08 1:01 ` Paul Brook
2010-06-08 1:56 ` Anthony Liguori
2010-06-08 2:56 ` Paul Brook
2010-06-09 7:44 ` Jes Sorensen
2010-06-09 7:47 ` Jes Sorensen
2010-06-07 23:52 ` [Qemu-devel] [PATCH 16/22] machine: move default machine out of machine definitions Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 17/22] machine: kill machine->alias Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 18/22] machine: final conversion to pure QemuOpts Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 19/22] machine: introduce accel option to allow selection of kvm or tcg Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 20/22] machine: introduce machine core and split qemu_register_machine Anthony Liguori
2010-06-07 23:52 ` [Qemu-devel] [PATCH 21/22] machine: convert pc machines to split core vs machine API Anthony Liguori
2010-06-09 7:51 ` Jes Sorensen
2010-06-07 23:52 ` [Qemu-devel] [PATCH 22/22] machine: introduce -machine-def option to define a machine via config Anthony Liguori
2010-06-08 0:50 ` Anthony Liguori
2010-06-10 17:48 ` Daniel P. Berrange
2010-06-11 13:03 ` Daniel P. Berrange
2010-06-08 3:12 ` [Qemu-devel] [PATCH 0/22] Refactor machine support Paul Brook
2010-06-08 10:24 ` [Qemu-devel] " Paolo Bonzini
2010-06-08 14:30 ` Paul Brook
2010-06-08 15:28 ` Anthony Liguori
2010-06-08 15:36 ` Paul Brook
2010-06-08 15:58 ` Paolo Bonzini
2010-06-08 16:15 ` Anthony Liguori [this message]
2010-06-08 21:05 ` Alexander Graf
2010-06-08 21:16 ` Anthony Liguori
2010-06-08 17:23 ` Anthony Liguori
2010-06-09 2:11 ` Paul Brook
2010-06-09 13:55 ` Anthony Liguori
2010-06-09 14:30 ` Paul Brook
2010-06-09 20:47 ` Blue Swirl
2010-06-09 20:52 ` Anthony Liguori
2010-06-09 21:09 ` Blue Swirl
2010-06-09 22:26 ` Paul Brook
2010-06-08 14:04 ` [Qemu-devel] " Anthony Liguori
[not found] <332590591.2705881276008246310.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2010-06-08 14:49 ` [Qemu-devel] " Paolo Bonzini
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=4C0E6CB2.20507@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=aliguori@us.ibm.com \
--cc=glommer@redhat.com \
--cc=paul@codesourcery.com \
--cc=pbonzini@redhat.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).