qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 12/13] q35: fill in usb pci slots with -usb


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v1 12/13] q35: fill in usb pci slots with -usb
Date: Tue, 30 Oct 2012 17:19:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.8) Gecko/20121012 Thunderbird/10.0.8

On 10/30/12 16:19, Jason Baron wrote:
> On Tue, Oct 30, 2012 at 07:34:26AM +0100, Gerd Hoffmann wrote:
>>   Hi,
>>
>>> +            uhci_devname[sizeof(uhci_devname) - 2] = ((char)'1') + i;
>>
>> snprintf(devname, sizeof(devname), "...%d", i) is more readable.
> 
> ok.
> 
>>
>>> +            qdev_prop_set_string(usb_qdev, "masterbus", "ich9-usb-bus.0");
>>
>> Any reason why you rename the usb bus?
>>
> 
> I wasn't sure if the user created usb devices on the command-line via
> -device if that would break naming here. Thus, I added a 'private' name.
> If the naming is stable, that works. It would be 'usb-bus.0', in that
> case?

"usb.0" would be the default name, but you don't need to know it, you
can just look up what qdev created.  See here:

http://www.kraxel.org/cgit/qemu/commit/?h=rebase/usb-next&id=70b9867011c4793787c5acee3d2005a6bc951f59

[ This is part of the "usb patch queue" patch series posted today,
  depending on how the qom discussions go and how fast it goes in
  you might just call the function the patch provides.  Or do
  something simliar in pc_q35.c and I'll drop the patch. ]

-usb for -M pc creates a "usb.0" bus too, so I don't expect trouble.

cheers,
  Gerd




reply via email to

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