From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3YF1-0007AN-5f for qemu-devel@nongnu.org; Mon, 11 May 2009 12:20:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3YEw-000798-Nj for qemu-devel@nongnu.org; Mon, 11 May 2009 12:20:34 -0400 Received: from [199.232.76.173] (port=43550 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3YEw-000795-EO for qemu-devel@nongnu.org; Mon, 11 May 2009 12:20:30 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:52393) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M3YEw-0006pw-1E for qemu-devel@nongnu.org; Mon, 11 May 2009 12:20:30 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e33.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4BGIf65001884 for ; Mon, 11 May 2009 10:18:41 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4BGKH57130300 for ; Mon, 11 May 2009 10:20:19 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4BGKH7N012359 for ; Mon, 11 May 2009 10:20:17 -0600 Message-ID: <4A085040.3000409@us.ibm.com> Date: Mon, 11 May 2009 11:20:16 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1242052009-27339-1-git-send-email-aliguori@us.ibm.com> <200905111548.48216.paul@codesourcery.com> <4A084CD2.7070108@us.ibm.com> <200905111716.35553.paul@codesourcery.com> In-Reply-To: <200905111716.35553.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/4][RFC] Add module infrastructure to QEMU List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook wrote: > On Monday 11 May 2009, Anthony Liguori wrote: > >> The numeric priorities are an implementation detail. No one should ever >> consume module_init() directly and I should add appropriately scary >> comments to that affect. >> > > Having looked a bit deeper, you're not actually implementing priorities. > You're implementing different categories of init function. So this should be > an enum, and be renames to something less confusing. > Good point, will do. >> We do have dependencies. I'd like virtio to be a module, and I'd like >> virtio-net, virtio-blk, etc. to be modules. This gets exposed as >> virtio.c being a bus_init() and virtio-*.c being virtio_init(). We use >> the integer priorities in module.h to express this. >> > > I'm not convinced virtio is as much of a separate entity as you think it is. > It's certainly not a bus. It's an implementation detail that happens to be > shared by several devices. > It is once you abstract out the transport API from the transport implementation. We fall short here in QEMU today mainly for better integration with how machines are created today. I'd like to refactor the QEMU virtio code though to be closer to the Linux side of things. I see a module mechanism like this as a prereq for doing such a refactoring. s390 uses a different transport implementation (there is no PCI on s390)for virtio so if QEMU ever were to support KVM with s390, we would need a way to support this. > Paul > -- Regards, Anthony Liguori