* [Qemu-devel] qdev and compound devices
@ 2011-06-23 13:01 Hans de Goede
2011-06-23 14:55 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2011-06-23 13:01 UTC (permalink / raw)
To: qemu-devel@nongnu.org; +Cc: Gerd Hoffmann
Hi all,
I've been working on adding support to the usb-ehci code
to have an uhci companion controller. This is actually
working quite well, and the code is pretty nice too,
see:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=usbredir
Note the last commit likely needs to be split into 2, and
that tree contains some other stuff too.
Anyways to add support for a companion controller the
logical thing to do would be to do:
s->companion = pci_create_simple(bus, companion_devfn,
"usb-ehci-uhci-companion");
From the qdev initfn for usb-ehci, this works if
I create the usb-ehci instance from pc_init1() from
hw/pc_piix.c . But for some reason it does not work
if I simple add: "-device usb-ehci, multifunction=on" to
the qemu cmdline. The device gets created, but no ioports
/ interrupts get assigned, and it does not show up in
lspci in the guest.
Regards,
Hans
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] qdev and compound devices
2011-06-23 13:01 [Qemu-devel] qdev and compound devices Hans de Goede
@ 2011-06-23 14:55 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2011-06-23 14:55 UTC (permalink / raw)
To: Hans de Goede; +Cc: qemu-devel@nongnu.org
On 06/23/11 15:01, Hans de Goede wrote:
> Hi all,
>
> I've been working on adding support to the usb-ehci code
> to have an uhci companion controller. This is actually
> working quite well, and the code is pretty nice too,
> see:
> http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=usbredir
>
> Note the last commit likely needs to be split into 2, and
> that tree contains some other stuff too.
>
> Anyways to add support for a companion controller the
> logical thing to do would be to do:
> s->companion = pci_create_simple(bus, companion_devfn,
> "usb-ehci-uhci-companion");
>
> From the qdev initfn for usb-ehci, this works if
> I create the usb-ehci instance from pc_init1() from
> hw/pc_piix.c . But for some reason it does not work
> if I simple add: "-device usb-ehci, multifunction=on" to
> the qemu cmdline. The device gets created, but no ioports
> / interrupts get assigned, and it does not show up in
> lspci in the guest.
Basically we'll want be able to create a multifunction device like this:
[root@rincewind ~]# lspci -s1d
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI
Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI
Controller #1 (rev 03)
Ideally via "-device ich9-ehci-uhci,addr=1d" or simliar. Asking the
user to create the four subdevices manually, with properties set
correctly to wind up the usb port relations is kida insane ...
Ideas how to do that best?
cheers,
Gerd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-23 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23 13:01 [Qemu-devel] qdev and compound devices Hans de Goede
2011-06-23 14:55 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).