Anthony Liguori <anth...@codemonkey.ws> writes: [On how to model virtio devices in QOM:] > Basically, it should look like: > > VirtioPCIDevice is-a PCIDevice > > VirtioPCIDevice has-a link<VirtioDevice>
Could you explain why this is link<> and not child<>? > VirtioDevice is-a DeviceState > > VirtioBlk is-a VirtioDevice > VirtioNet is-a VirtioDevice > ... > > VirtioPCIBlk is-a VirtioPCIDevice > VirtioPCIBlk has-a child<VirtioBlk> > > This gives us backwards compat while also providing a cleaner > model. VirtioPCIBlk et al would be deprecated eventually (but not any > time soon).