From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4Ius-0002fw-SA for qemu-devel@nongnu.org; Thu, 15 Sep 2011 16:52:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4Iur-0002RE-9H for qemu-devel@nongnu.org; Thu, 15 Sep 2011 16:52:14 -0400 Received: from mail-gw0-f53.google.com ([74.125.83.53]:61566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4Iur-0002R9-23 for qemu-devel@nongnu.org; Thu, 15 Sep 2011 16:52:13 -0400 Received: by gwj20 with SMTP id 20so3128425gwj.12 for ; Thu, 15 Sep 2011 13:52:12 -0700 (PDT) Message-ID: <4E726579.7070902@codemonkey.ws> Date: Thu, 15 Sep 2011 15:52:09 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E70EC90.8000904@us.ibm.com> <4E719F7C.10700@redhat.com> <4E71FD19.6050606@codemonkey.ws> <4E725EC9.6060506@redhat.com> In-Reply-To: <4E725EC9.6060506@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Plan for moving forward with QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Peter Maydell , Jan Kiszka , qemu-devel , Markus Armbruster , Gerd Hoffmann , Paolo Bonzini , "Edgar E. Iglesias" On 09/15/2011 03:23 PM, Avi Kivity wrote: > On 09/15/2011 04:26 PM, Anthony Liguori wrote: >> >> I think this model is the closest to what we have today and is the most >> obvious. For something like ne2k, I would expect: >> >> class NE2000 : public Device >> { >> // ne2k public functions >> }; >> >> class PCI_NE2000 : public PciDevice >> { >> // implement PCI functions by calling ne2k public functions >> NE2000 ne2k; >> }; >> >> class ISA_NE2000 : public IsaDevice >> { >> // implement ISA functions by calling ne2k public functions >> NE2000 ne2k; >> }; > > Also, NE2000 methods have to call ISA_NE2000 and PCI_NE2000 methods, yes? I don't think so. The NE2k would export an IRQ and the ISA_NE2K and PCI_NE2k would have to route that IRQ. But I think that's the extent of the communication in that direction. Am I missing something? Regards, Anthony Liguori That's > going to be more difficult. Not impossible, just hard. It's probably going to > involve device specific code that models what type of glue was used for that > particular device/bus combo. >