From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L10jU-0004BD-Oa for qemu-devel@nongnu.org; Fri, 14 Nov 2008 10:37:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L10jU-0004Ac-1D for qemu-devel@nongnu.org; Fri, 14 Nov 2008 10:37:16 -0500 Received: from [199.232.76.173] (port=41408 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L10jT-0004AP-Is for qemu-devel@nongnu.org; Fri, 14 Nov 2008 10:37:15 -0500 Received: from mx2.redhat.com ([66.187.237.31]:37578) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L10jT-0004f3-FF for qemu-devel@nongnu.org; Fri, 14 Nov 2008 10:37:15 -0500 From: Mark McLoughlin In-Reply-To: <491C83B2.8010003@codemonkey.ws> References: <> <1226594763-2304-1-git-send-email-markmc@redhat.com> <1226594763-2304-2-git-send-email-markmc@redhat.com> <491C83B2.8010003@codemonkey.ws> Content-Type: text/plain Date: Fri, 14 Nov 2008 15:34:01 +0000 Message-Id: <1226676841.9332.75.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/5] Re-factor nic model listing Reply-To: Mark McLoughlin , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paul Brook On Thu, 2008-11-13 at 13:44 -0600, Anthony Liguori wrote: > Mark McLoughlin wrote: > > Add a nic_models() method to QEMUMachine and move the nic model > > listing from hw/pc.c to vl.c. > > > > pci_nic_models() is hooked up to all machines which use > > pci_nic_init(). > > > > The isapc machine is the only one which is slightly different > > since it only supports the ne2k_isa model. > > > > In principle, I think this patch series is a good idea. I think the > abstraction here is a little broken. > > I don't think it's correct to associate nics directly with a machine > type. Rather, nics have bus requirements (like PCI, ISA, or USB) and a > machine may or may not contain that bus. i.e. add a bus abstraction (with ->nic_models()) which PCI, ISA and USB would specialize and have a list of buses associated with the machine? Cheers, Mark.