From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQVKc-00005O-9t for qemu-devel@nongnu.org; Fri, 04 May 2012 23:06:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQVKa-0004GE-Ej for qemu-devel@nongnu.org; Fri, 04 May 2012 23:06:49 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:26795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQVKa-0004FO-92 for qemu-devel@nongnu.org; Fri, 04 May 2012 23:06:48 -0400 Received: from euspt2 (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M3J00KRK4N1MS@mailout2.w1.samsung.com> for qemu-devel@nongnu.org; Sat, 05 May 2012 04:06:37 +0100 (BST) Received: from [106.109.9.191] by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M3J000XZ4N4Z4@spt2.w1.samsung.com> for qemu-devel@nongnu.org; Sat, 05 May 2012 04:06:41 +0100 (BST) Date: Sat, 05 May 2012 07:06:40 +0400 From: Evgeny Voevodin In-reply-to: <4FA3D751.80806@codemonkey.ws> Message-id: <4FA49940.2090603@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7BIT References: <1335333257-5128-1-git-send-email-e.voevodin@samsung.com> <4FA3D751.80806@codemonkey.ws> Subject: Re: [Qemu-devel] [RFC 0/9] Virtio-mmio refactoring. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , aliguori@us.ibm.com, i.mitsyanko@samsung.com, qemu-devel@nongnu.org, kyungmin.park@samsung.com, d.solodkiy@samsung.com, m.kozlov@samsung.com On 04.05.2012 17:19, Anthony Liguori wrote: > On 05/03/2012 07:14 AM, Peter Maydell wrote: >> On 25 April 2012 06:54, Evgeny Voevodin wrote: >>> In this patchset refactoring of virtio-mmio layer is made. >>> Instead of creating virtio-blk-mmio, virtio-net-mmio, etc on the >>> system bus >>> we create virtio-blk, virtio-net, etc devices on the >>> virtio-transport bus. >>> To create virtio-transport bus virtio-mmio-transport device provided. >>> Transport device plugs into virtio-mmio bus. >>> To create virtio-mmio bus virtio-mmio-bridge device provided. >> >> This seems to me to have one more layer than it needs. Why not just: >> create virtio-blk, virtio-net, etc on the virtio-transport bus >> To create virtio-transport bus, we create a virtio-mmio-transport >> device, and this device is a sysbus device. >> >> ie why do you have separate "virtio-mmio-transport" and >> "virtio-mmio-bridge" devices, and two different new buses ("virtio-mmio" >> and "virtio-transport") rather than just "virtio-transport"? > > I think using a bus won't work. You need to create a VirtioDevice > that has a link. I would suggest making > VirtioTransport an interface. Do you mean latest QOM series that qomyfies buses or some issue in pci (which I don't see)? I was planning to refactor virtio-pci, make sure it works and then hoping that last QOM series lands in master convert all the stuff to correspond it. > > Then you can have VirtioPCI inherit from PCIDevice and implement > VirtioTransport. -- Kind regards, Evgeny Voevodin, Leading Software Engineer, ASWG, Moscow R&D center, Samsung Electronics e-mail: e.voevodin@samsung.com