From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiqXm-0008BO-7J for qemu-devel@nongnu.org; Wed, 12 Dec 2012 12:56:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiqXg-00062w-6B for qemu-devel@nongnu.org; Wed, 12 Dec 2012 12:56:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiqXf-00062o-Tp for qemu-devel@nongnu.org; Wed, 12 Dec 2012 12:56:24 -0500 Message-ID: <50C8C53D.5080206@redhat.com> Date: Wed, 12 Dec 2012 18:56:13 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1355157952-2321-1-git-send-email-fred.konrad@greensocs.com> <1355157952-2321-8-git-send-email-fred.konrad@greensocs.com> <50C8C4A2.7010709@suse.de> In-Reply-To: <50C8C4A2.7010709@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Peter Maydell , aliguori@us.ibm.com, e.voevodin@samsung.com, "Michael S. Tsirkin" , mark.burton@greensocs.com, qemu-devel@nongnu.org, Alexander Graf , stefanha@redhat.com, cornelia.huck@de.ibm.com, fred.konrad@greensocs.com Il 12/12/2012 18:53, Andreas F=C3=A4rber ha scritto: > Am 12.12.2012 15:25, schrieb Peter Maydell: >> How will the PCI transport's PCI vendor/device/class IDs be >> set (a) when a virtio-blk backend is created and separately >> plugged into a virtio-pci transport (b) for the legacy >> virtio-pci-blk? [ideally the answer to (b) should be "in the >> same way as for (a)"] >=20 > The obvious answer would be that PCI properties need to be set on the > PCI device, not an a VirtioDevice sitting on a virtio-bus. Yes, but the question is *how*... if there will be no usable "-device virtio-pci", the value of this refactoring becomes a bit lower... Paolo > I.e., with the proposed refactoring we'd have on the virtio-bus: >=20 > - VirtioDevice > + VirtioBlockDevice > + VirtioSCSIDevice - has-a scsi-bus > ... >=20 > In turn that means that every VirtioDevice to be exposed as PCI device > to the guest needs it own PCIDevice exposing a private virtio-bus. >=20 > - PCIDevice > - VirtioPCIDevice - has-a virtio-bus > + virtio-blk-pci - has-a VirtioBlockDevice on its virtio-bus > + virtio-scsi-pci - has-a VirtioSCSIDevice on its virtio-bus > ... >=20 > This also happens to solve most of the migration compatibility pretty > nicely because the wapping PCI devices would be used almost as before, > some state may need to be forwarded to the VirtioDevice. >=20 > Finally supplying a public device_initialize() or so would be helpful > for the latter since VMState cannot cross pointers IIRC. I'll look into > that part since inlining the old qdev functions cripples my Tegra work. >=20 > Andreas >=20