From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQH9f-0003Ws-HY for qemu-devel@nongnu.org; Fri, 04 May 2012 07:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQH9a-0003po-Nh for qemu-devel@nongnu.org; Fri, 04 May 2012 07:58:35 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:26003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQH9a-0003pW-Hj for qemu-devel@nongnu.org; Fri, 04 May 2012 07:58:30 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8; format=flowed Received: from euspt1 ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M3H00ATMYKDRR60@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Fri, 04 May 2012 12:57:49 +0100 (BST) Received: from [106.109.9.191] by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M3H006ESYLCLN@spt1.w1.samsung.com> for qemu-devel@nongnu.org; Fri, 04 May 2012 12:58:25 +0100 (BST) Date: Fri, 04 May 2012 15:58:22 +0400 From: Evgeny Voevodin In-reply-to: <4FA35000.6050009@samsung.com> Message-id: <4FA3C45E.1070509@samsung.com> References: <1335333257-5128-1-git-send-email-e.voevodin@samsung.com> <4FA35000.6050009@samsung.com> Subject: Re: [Qemu-devel] [RFC 0/9] Virtio-mmio refactoring. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 07:41, Evgeny Voevodin wrote: > On 03.05.2012 16:14, 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"? >> >> -- PMM >> > > Actually, the only necessity to have a bridge device is to count amount > of transport devices. Amount of transport devices we need to know because > we want to specify names to transport buses (virtio-mmio.0, > virtio-mmio.1, ...). > If there is a way to find out amount of transport devices on sysbus (and > on pci bus) > we don't need bridge device. > Maybe, there is also another way to specify bus names instead of just > get parent bus name > and add transport device's index as a tail. > Ok, seems that we don't need that bridge device. Each transport device can run through all childs of parent bus and look if they have created virtio bus and then specify appropriate name to its virtio bus. -- Kind regards, Evgeny Voevodin, Leading Software Engineer, ASWG, Moscow R&D center, Samsung Electronics e-mail: e.voevodin@samsung.com