Il 03/10/2012 16:53, Eduardo Habkost ha scritto: >> > >> > Can you add a hook to QEMUMachine so that this object is created by >> > qdev_get_machine() and ends up at /machine? > Oh, I didn't know there was an existing "machine" object already, I > didn't know qdev_get_machine(). > > Shouldn't /machine be a child of the "container" class?
It should, but note that "container" is really just the same as TYPE_OBJECT. It is only for clarity that a difference class is used. So using TYPE_DEVICE for now is not too bad. Paolo > That leads to > the other question you asked in another message: in this case, PC > wouldn't be a child of DeviceState, and we would need an additional > mechanism to allow non-DeviceState objects to use global properties. > > (The sole reason I introduced the PC class was to allow the PC code to > use the compatibility "contiguous_apic_ids" global property.)