From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQ9PL-00056s-On for qemu-devel@nongnu.org; Thu, 03 May 2012 23:42:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQ9P7-0004Fq-IZ for qemu-devel@nongnu.org; Thu, 03 May 2012 23:42:14 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:49534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQ9P7-00048C-9E for qemu-devel@nongnu.org; Thu, 03 May 2012 23:42:01 -0400 Received: from euspt1 (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 <0M3H006A2BLOSI@mailout2.w1.samsung.com> for qemu-devel@nongnu.org; Fri, 04 May 2012 04:41:48 +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 <0M3H001DPBLTDA@spt1.w1.samsung.com> for qemu-devel@nongnu.org; Fri, 04 May 2012 04:41:54 +0100 (BST) Date: Fri, 04 May 2012 07:41:52 +0400 From: Evgeny Voevodin In-reply-to: Message-id: <4FA35000.6050009@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> Subject: Re: [Qemu-devel] [RFC 0/9] Virtio-mmio refactoring. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: 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 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. -- Kind regards, Evgeny Voevodin, Leading Software Engineer, ASWG, Moscow R&D center, Samsung Electronics e-mail: e.voevodin@samsung.com