From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSRUg-0004xy-LL for qemu-devel@nongnu.org; Thu, 10 May 2012 07:25:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSRUa-0000qU-79 for qemu-devel@nongnu.org; Thu, 10 May 2012 07:25:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:57540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSRUa-0000pn-0K for qemu-devel@nongnu.org; Thu, 10 May 2012 07:25:08 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SSRUW-0004kO-LK for qemu-devel@nongnu.org; Thu, 10 May 2012 13:25:04 +0200 Received: from 213.33.220.118 ([213.33.220.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 May 2012 13:25:04 +0200 Received: from e.voevodin by 213.33.220.118 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 May 2012 13:25:04 +0200 From: Evgeny Voevodin Date: Thu, 10 May 2012 15:24:53 +0400 Message-ID: <4FABA585.8050400@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Virtio-pci issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kyungmin Park , Peter Maydell , Anthony Liguori , Dmitry Solodkiy Hi, guys! While trying to refactor virtio-pci as continuation of my RFC virtio-mmio patch series: http://lists.gnu.org/archive/html/qemu-devel/2012-04/msg03665.html I've faced a problem. I try to create virtio-pci-transport device to which virtio-blk,net,etc could be connected. Any board could create as many transport devices as it wants and then any actual back-end could be connected to that transport through a provided virtio-pci.x bus. virtio-pci-transport is derived from TYPE_PCI_DEVICE. The problem is that if I create transport devices and wish to connect back-ends to them, each back-end would set its properties to the class, not to the object. For example, vendor_id property is different for blk and net, but since they are both have same class PCIDeviceClass, they share that property. How to deal with this? -- Kind regards, Evgeny Voevodin, Leading Software Engineer, ASWG, Moscow R&D center, Samsung Electronics e-mail: e.voevodin@samsung.com