On Mon, Mar 26, 2012 at 6:40 AM, <zwu.ker...@gmail.com> wrote: > From: Zhi Yong Wu <wu...@linux.vnet.ibm.com> > > Sending the patchset is mainly intended to get some comments and void the > wrong development direction. > > The patchset is used to qomify -netdev, but it introduce one infrastructure > for host devices based on raw Class and Object, not qdev. So they are not > related with DeviceClass and DeviceState. > > patch #1 introduce one new class and object for host devices.
A common infrastructure for host devices is useful. The Property mechanism in hw/qdev-properties.c is especially good. I think host devices will also need to 2-step creation process (init and realize). I think the qdev-properties.c code can mostly be shared. It currently uses the qdev DeviceState class but I think it only really access the Property array. Therefore it should be possible to really share a single copy of the code. We don't need to duplicate Property for host devices, instead we can extract it out of hw/. Stefan