[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option |
Date: |
Tue, 13 Oct 2009 21:26:09 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Anthony Liguori <address@hidden> 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".
- [Qemu-devel] [PATCH v2 9/9] Add -kvm option, (continued)
- [Qemu-devel] [PATCH v2 9/9] Add -kvm option, Glauber Costa, 2009/10/07
- [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/07
- [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Glauber Costa, 2009/10/07
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/07
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Gerd Hoffmann, 2009/10/12
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/12
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Gerd Hoffmann, 2009/10/12
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/12
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Gerd Hoffmann, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option,
Markus Armbruster <=
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Gerd Hoffmann, 2009/10/14
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Jamie Lokier, 2009/10/13
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Avi Kivity, 2009/10/08
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/08
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Avi Kivity, 2009/10/08
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/08
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Avi Kivity, 2009/10/08
- Re: [Qemu-devel] Re: [PATCH v2 9/9] Add -kvm option, Anthony Liguori, 2009/10/08