qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] Plan for moving forward with QOM


From: Avi Kivity
Subject: Re: [Qemu-devel] [RFC] Plan for moving forward with QOM
Date: Thu, 15 Sep 2011 23:23:37 +0300
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

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? 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.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]