From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZjWy-0005q3-3v for qemu-devel@nongnu.org; Thu, 23 Jun 2011 09:01:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZjWw-0004Hf-EN for qemu-devel@nongnu.org; Thu, 23 Jun 2011 09:01:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZjWv-0004HN-RY for qemu-devel@nongnu.org; Thu, 23 Jun 2011 09:01:10 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5ND17DX002584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 23 Jun 2011 09:01:08 -0400 Message-ID: <4E033946.5040902@redhat.com> Date: Thu, 23 Jun 2011 15:01:58 +0200 From: Hans de Goede MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] qdev and compound devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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