On Tue, 1 Dec 2015 13:48:13 +0200, address@hidden wrote:
May I suggest the following:
- Expose 'pci_qdev_realize'
- Have 'virtio_pci_class_init' arm it's own dc->realize,
which will first set 'QEMU_PCI_CAP_EXPRESS' flag as needed,
and then call 'pci_qdev_realize'
- Now, in 'virtio_pci_realize' we may use 'pci_is_express' instead of
directly checking the proxy->flags
If this sounds ok, I'll submit a fix.
Give it a try, sure, but you don't need to expose pci_qdev_realize,
you can 'hijack' parent's realize method before replacing it.
Actually I caught this as I needed to do something very similar to
vmxnet3.
Since we need this in 2 places, I thought it would be better to expose
pci_qdev_realize (maybe name it better) and not store parent's original
realize before replacing it.
WDYT?