From: Paul Brook <paul@codesourcery.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Glauber Costa <glommer@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 0/22] Refactor machine support
Date: Wed, 9 Jun 2010 23:26:38 +0100 [thread overview]
Message-ID: <201006092326.39010.paul@codesourcery.com> (raw)
In-Reply-To: <4C0FFF13.1060700@codemonkey.ws>
> >> AFAICS the current commandline options only result in simple addition of
> >> devices. They might add slightly different devices in slightly different
> >> places, but that's easy to accommodate by having the machine define a
> >> few standard device/bus IDs.
> >>
> >> IMO it's even more lame if -hda shops working when you supply a device
> >> tree.
> >
> > The tree supplied by the user should label a bus node with a property
> > 'QEMU,hda'. The C version (called by the board) would be something
> > like setprop("/i440fx/pci.0/ide.0", "QEMU,hda"). QEMU should search
> > the device tree for such labels at startup.
>
> That works for the very simple case of -hda, but what do you do for:
>
> -drive file=foo.img,bus=0,index=2
I don't see how that is any harder. I'm assuming that -hda is a trivial alias
for -drive bus=0,index=0. Fact is that -drive supports a very limited set of
operations. Figuring out the default interface is easy - use whatever exists
on the machine. Creating IDE disks is easy, just add them to the existing IDE
bus. For SCSI/virtio you might need to add a HBA first, but that's also
fairly trivial. Most other interfaces (sd, pflash) don't do automagical
device creation to start with - if you don't specify an image then you get an
empty/disconnected device.
> I think it's possible to come up with some form of solution once you
> start adding synthetic properties or dummy devices but ultimately I
> think it pollutes the device tree. I think the easiest way to support
> the interfaces we provide now is to just code the device tree
> manipulation in C.
I disagree. If programmatic machine construction/manipulation was sufficient
then we wouldn't need device trees at all. Current qemu supports an extremely
limited set of machines. Bear in mind that x86 PCs are, pretty much by
definition, approximately all the same to start with. Once you start looking
at other platforms (e.g. arm boards) you realise just how cripplingly
restrictive the this is. Restricting -hda, -drive, etc. and similar to a
small subset of built-in machines is IMO and unacceptably poor solution.
Some of your arguments seem to be self-fulfilling prophecies. If you design
your new option structure around a magical self-morphing device tree then it's
unlikely that this will work with user specified device trees. I believe the
current set of commandline options are sufficient abstract that they do not
dictate a particular implementation.
Paul
next prev parent reply other threads:[~2010-06-09 22:27 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
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 [this message]
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=201006092326.39010.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=glommer@redhat.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).