On 06/10/09 10:31, Han, Weidong wrote:
Avi Kivity wrote:
Can you check pci_dev->qdev instead of assigned? A little less
ugly.
I tried to find an easy and clean way to check it, but I found the
members of struct PCIDevice and DeviceState were not suitable for
this checking, and qdev is not pointer in struct PCIDevice.
Well, certain DeviceState pointers (type for example) are set only in
case the device was created using the qdev api. I think you certainly
should get away without adding a new parameter to pci_unregister_device.
Also I've just sent a patch to the qemu-devel fixing the qdev register
API for pci devices, allowing to register config space callbacks. Once
this is merged you can switch pci passthrough to the new qdev API.
cheers,
Gerd
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html