Paolo Bonzini <[email protected]> writes:
> Il 03/04/2014 21:24, Nikunj A Dadhania ha scritto:
>>> > Does libvirt use "-nodefaults -machine usb=true"? It should create the
>>> > OHCI controller separately instead of using "-machine".
>> I see it creating:
>>
>> -nodefaults -usb -device usb-kbd,id=input0 -device usb-mouse,id=input1
>>
>> And -usb is translated to adding "pci-ohci" controller for spapr
>
> Yeah, but with -nodefaults it's better to use -device directly.
I think there is special handling for this in vl.c
bool usb_enabled(bool default_usb)
{
return qemu_opt_get_bool(qemu_get_machine_opts(), "usb",
has_defaults && default_usb);
}
And spapr.c uses this:
if (usb_enabled(spapr->has_graphics)) {
pci_create_simple(phb->bus, -1, "pci-ohci");
Regards
Nikunj