On 09/15/2011 05:31 PM, Anthony Liguori wrote:
I think it's in the eye of a beholder. Hold a PCI NE2000 and E1000,
they're clearly both PciDevices, but also they clearly both have PciConnectors.
Write a driver for a PCI and ISA NE2000, and then they're clearly both
NE2000, but also they clearly both have an NE2K chip.
Are we just bike shedding then? Since both models can be expressed by
the same infrastructure, does it really matter which model is the One
True Right Model?
Well, it matters when "how do we model PCI" covers 90% of the devices
around. :) In general, early conversions tend to become models for
later ones.
It's certainly good that QOM can be applied to either model. If it
couldn't, something would be very wrong in it.
I think this might be a better discussion to have during conversions.
IOW, what makes sense for PCI, what makes sense for ISA, etc.
More pragmatically, what I am suggesting is a refactoring of how PCI is
abstracted, and that obviously makes it less appealing than a straight
conversion.
So, it would have been nice to have it as the one true right model, and
as an example of how to do buses in QOM, but it is indeed safer to do it
in two steps. Connectors can be done later when somebody will really
need to inherit from something else.
Paolo