From: Markus Armbruster <armbru@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Glauber Costa <glommer@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option
Date: Tue, 13 Oct 2009 21:26:09 +0200 [thread overview]
Message-ID: <87eip79ju6.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <4AD49DDA.8060101@us.ibm.com> (Anthony Liguori's message of "Tue\, 13 Oct 2009 10\:33\:46 -0500")
Anthony Liguori <aliguori@us.ibm.com> writes:
> Gerd Hoffmann wrote:
>>> qemu should not have the concept of a default nic.
>>
>> Well, right now it has (likewise for serial, vga, ...). And it
>> causes problems with the qdev way of managing devices, so we have to
>> find a way to deal with it.
>
> There are a few separate issues that should be treated differently.
> For vga, it should just be a default device in the machine
> description. A special id should be used for the default vga card and
> -vga std should have the effect of modifying the a vga device of that
> id to be std. IOW, it should be -device-remove id=default_vga -device
> stdvga,id=default_vga.
>
> For serial, we default to having one port. Again, it should have a
> well known id and -serial none should be -device-remove
> id=default_serial. For nics, it's a bit complicated by the fact that
> -net nic doesn't require a model and by default, each machine may have
> a default model. We will likely have to preserve this as a config
> option which is unfortunate.
>
> That said, without -net none, we get a single network device. Again,
> it should have a well known id and -net none should remove that
> device.
>> Right now the default devices are tied to a command line switch,
>> i.e. in case there isn't a -serial switch specified qemu will add a
>> default serial device, even in case one was added via -device
>> isa-serial.
>
> I don't think -device has to have the same property of -serial. That
> is, -device isa-serial doesn't need to replace the default serial
> device which is connected to a vc. Rather, we should allow a user to
> modify the char device associated with that default serial device via
> -set.
>
> We shouldn't think of it like we add a default -serial device if no
> -serial switch was used. Instead, there has always been a default
> isa-serial device. You can modify it via -set or you can remove it.
> -serial none removes it. For the first occurrence of -serial, it
> behaves like -set. Future occurrences of -set behave like -device
> isa-serial.
The problem with that approach is in a part of Gerd's reply you snipped:
>> I still don't like the concept though. Configuring a second nic would
>> be different from configuring the first nic, because for the first
>> you'll modify the default device, the second is added instead.
>> libvirt folks will hate us for doing this.
Having to use -set for configuring the first device of a kind, and
-device for the second is a bad user interface. It's made worse by the
fact that you need -set only for some kinds of devices, namely the kinds
where QEMU provides a default.
I agree with Gerd that we should distinguish between required and
optional devices. It's fine to require -set for modifying required
devices like RTC. But when I configure my first and second NIC, I don't
really want to know that I'm actually modifying the first NIC and adding
the second NIC.
What about this: give the user a default FOO (for FOO in serial, NIC,
...) if he didn't configure one (no matter how, be it -device or some
legacy option to ask for FOOs). This way, you ask for your first FOO
exactly like any other: -device.
Extra points for providing a way to say "do not give me any optional
devices I didn't explicitely ask for".
next prev parent reply other threads:[~2009-10-13 20:26 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 22:08 [Qemu-devel] [PATCH v2] Add in-kernel irqchip Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 1/9] add base-addr field to io apic state Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 2/9] Save missing fields in VMState Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 3/9] provide in-kernel ioapic Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 4/9] provide in-kernel apic Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 5/9] provide apic_set_irq_delivered Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 6/9] provide in-kernel i8259 chip Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 7/9] initialize " Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 8/9] Initialize in-kernel irqchip Glauber Costa
2009-10-07 22:08 ` [Qemu-devel] [PATCH v2 9/9] Add -kvm option Glauber Costa
2009-10-07 23:00 ` [Qemu-devel] " Anthony Liguori
2009-10-07 23:14 ` Glauber Costa
2009-10-07 23:28 ` Anthony Liguori
2009-10-12 11:58 ` Gerd Hoffmann
2009-10-12 14:04 ` Anthony Liguori
2009-10-12 15:34 ` Gerd Hoffmann
2009-10-12 16:31 ` Anthony Liguori
2009-10-13 8:05 ` Gerd Hoffmann
2009-10-13 15:33 ` Anthony Liguori
2009-10-13 19:26 ` Markus Armbruster [this message]
2009-10-13 20:43 ` Anthony Liguori
2009-10-14 8:08 ` Gerd Hoffmann
2009-10-13 15:36 ` Anthony Liguori
2009-10-13 22:57 ` Jamie Lokier
2009-10-08 14:07 ` Avi Kivity
2009-10-08 14:23 ` Anthony Liguori
2009-10-08 14:30 ` Avi Kivity
2009-10-08 14:33 ` Anthony Liguori
2009-10-08 14:41 ` Avi Kivity
2009-10-08 14:56 ` Anthony Liguori
2009-10-08 15:05 ` Avi Kivity
2009-10-08 15:14 ` Anthony Liguori
2009-10-12 11:15 ` Gerd Hoffmann
2009-10-08 14:34 ` Gleb Natapov
2009-10-08 12:02 ` [Qemu-devel] Re: [PATCH v2 7/9] initialize i8259 chip Jan Kiszka
2009-10-08 13:55 ` [PATCH v2 4/9] provide in-kernel apic Anthony Liguori
2009-10-08 13:55 ` [Qemu-devel] " Anthony Liguori
2009-10-08 14:09 ` Avi Kivity
2009-10-08 14:09 ` [Qemu-devel] " Avi Kivity
2009-10-08 14:22 ` Glauber Costa
2009-10-09 10:06 ` Jamie Lokier
2009-10-09 10:06 ` [Qemu-devel] " Jamie Lokier
2009-10-09 14:30 ` Glauber Costa
2009-10-09 14:30 ` [Qemu-devel] " Glauber Costa
2009-10-09 16:48 ` Jamie Lokier
2009-10-09 16:48 ` Jamie Lokier
2009-10-09 18:06 ` Glauber Costa
2009-10-09 18:06 ` [Qemu-devel] " Glauber Costa
2009-10-09 19:49 ` Anthony Liguori
2009-10-09 19:49 ` Anthony Liguori
2009-10-11 9:10 ` Avi Kivity
2009-10-11 9:10 ` [Qemu-devel] " Avi Kivity
2009-10-12 13:41 ` Anthony Liguori
2009-10-12 13:41 ` Anthony Liguori
2009-10-08 14:26 ` Anthony Liguori
2009-10-08 14:26 ` Anthony Liguori
2009-10-08 14:31 ` Avi Kivity
2009-10-08 14:31 ` Avi Kivity
2009-10-08 14:39 ` Anthony Liguori
2009-10-08 14:46 ` Glauber Costa
2009-10-08 14:46 ` Glauber Costa
2009-10-08 14:44 ` Glauber Costa
2009-10-08 14:44 ` Glauber Costa
2009-10-08 11:46 ` [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic Jan Kiszka
2009-10-08 13:49 ` Anthony Liguori
2009-10-08 13:49 ` [Qemu-devel] " Anthony Liguori
2009-10-08 13:54 ` Avi Kivity
2009-10-08 13:54 ` [Qemu-devel] " Avi Kivity
2009-10-08 15:53 ` Jan Kiszka
2009-10-08 15:53 ` [Qemu-devel] " Jan Kiszka
2009-10-08 16:07 ` Jamie Lokier
2009-10-08 16:07 ` Jamie Lokier
2009-10-08 16:12 ` Anthony Liguori
2009-10-08 16:12 ` Anthony Liguori
2009-10-08 16:17 ` Avi Kivity
2009-10-08 16:17 ` Avi Kivity
2009-10-08 16:22 ` Gleb Natapov
2009-10-08 16:22 ` Gleb Natapov
2009-10-08 16:29 ` Avi Kivity
2009-10-08 16:29 ` Avi Kivity
2009-10-08 16:34 ` Gleb Natapov
2009-10-08 16:34 ` Gleb Natapov
2009-10-08 16:42 ` Avi Kivity
2009-10-08 16:42 ` Avi Kivity
2009-10-08 17:11 ` Gleb Natapov
2009-10-08 17:11 ` Gleb Natapov
2009-10-09 10:02 ` Jamie Lokier
2009-10-09 10:02 ` [Qemu-devel] " Jamie Lokier
2009-10-09 12:02 ` Gleb Natapov
2009-10-09 12:02 ` Gleb Natapov
2009-10-09 14:32 ` Glauber Costa
2009-10-09 14:32 ` [Qemu-devel] " Glauber Costa
2009-10-09 16:49 ` Jamie Lokier
2009-10-09 16:49 ` Jamie Lokier
2009-10-09 19:55 ` Juan Quintela
2009-10-09 21:34 ` Glauber Costa
2009-10-09 21:34 ` [Qemu-devel] " Glauber Costa
2009-10-12 13:20 ` Anthony Liguori
2009-10-12 13:20 ` [Qemu-devel] " Anthony Liguori
2009-10-12 14:18 ` Jamie Lokier
2009-10-12 14:18 ` [Qemu-devel] " Jamie Lokier
2009-10-12 14:49 ` Anthony Liguori
2009-10-12 14:49 ` [Qemu-devel] " 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=87eip79ju6.fsf@pike.pond.sub.org \
--to=armbru@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=glommer@redhat.com \
--cc=kraxel@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 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.