Re: [Qemu-devel] [PATCH] qdev: Revert the hack to let -net nic and pci_add set qdev ID

2010-06-14 Thread Anthony Liguori
On 06/08/2010 06:54 AM, Markus Armbruster wrote: Setting the ID in pci_nic_init() is a blatant violation of the DeviceState abstraction. Which even carries a comment advising against this: /* This structure should not be accessed directly. We declare it here so that it can be embedded in i

[Qemu-devel] [PATCH] qdev: Revert the hack to let -net nic and pci_add set qdev ID

2010-06-08 Thread Markus Armbruster
Setting the ID in pci_nic_init() is a blatant violation of the DeviceState abstraction. Which even carries a comment advising against this: /* This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures. */ What's worse