qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options


From: Markus Armbruster
Subject: Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options
Date: Thu, 07 Jun 2012 10:07:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Anthony Liguori <address@hidden> writes:

> On 06/07/2012 05:13 AM, Benjamin Herrenschmidt wrote:
>> On Wed, 2012-06-06 at 13:42 +0800, Anthony Liguori wrote:
>>> On 06/06/2012 11:31 AM, Benjamin Herrenschmidt wrote:
>>>> On Wed, 2012-06-06 at 10:52 +0800, li zhang wrote:
>>>>> Hi Anthony,
>>>>>
>>>>>
>>>>> Any comment on this?
>>>>
>>>> Allright, this is all quite confusing...
>>>>
>>>> He's what I think should happen:
>>>>
>>>> When no option is passed -at-all-, we should have vga std and usb ohci +
>>>> usb mouse + usb ps2.
>>>>
>>>> When -nodefault is passed, we should have none of the above.
>>>
>>> -nodefault is a pretty ugly hack.  I don't think there's any good reason to
>>> involve -nodefault into this discussion.
>>
>> Well, it's pretty fundamental to how libvirt does thing afaik...
>>
>> Take pseries, by "default" today it has a vscsi, a vterm etc.... but
>> with -nodefault, none of this so libvirt can create them manually.
>
> You misunderstand what I'm saying.
>
> -nodefault is a dumb option.  It's semantics are poorly defined
> because it depends on machine.  Further complicating those semantics
> by adding more magic for -M spapr just makes the situation worse.

Without -nodefaults, you get the machine the developers think most
people want.  Example: you may get a default serial device.  Whether you
get one and which one you get depends on the machine.

With -nodefaults, you get a variant of the same machine with those
optional devices omitted the developers think somebody might want to
suppress or define himself.

Both are "defined" the same way: you get what you get, and the
developers promise not to change it too much.

For some kinds of devices, there's magic to make user-defined devices
replace default devices.  Example: -serial and -device isa-serial
suppress the default serial device.

For some kinds of devices, there's a device-specific way to suppress
default devices.  Example: -serial none suppresses the default serial
device.  Counter-example: you can't suppress the default floppy
(frontend if the machine supports floppies, backend whether it does or
not) other than with -nodefaults.

The truly "poor" bit in -nodefaults is the name: I keep reading "node
faults" %-)

> I'm suggesting to make use of the -machine option to allow usb to be 
> disabled.  So:
>
> qemu-system-ppc64 -machine type=spapr,usb=off
>
> libvirt can still happily name the usb controller whatever it wants.
> But the end result is a less magical command line.

The USB host controller is currently disabled by default on all
machines.  If we enable it by default (which I think is a good idea), we
may want to give users a way to suppress it.

Your proposed -M parameter usb is yet another device-specific way to
suppress default devices.  We got a few, one more won't kill us.  Much
better would be adding a device-independent way to suppress a default
device.

Adding default USB suppression without having -nodefaults cover it is
something new, though: -nodefaults no longer omits optional devices "the
developers think somebody might want to suppress or define himself".
Feels like reneging on what -nodefaults promised to do.  I'd recommend
to think twice about that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]