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.