Creating a dummy PCI device
Hi,
I have a special use case of creating a dummy PCI device with a certain vendor/device ID. The device does not have to actually function, it just
has to be visible under lspci.
Any idea how to achieve this? I was thinking of modifying the edu pci device to make the device/vendor ID passable via cmdline.
Don't know if thats a good idea.
Any thoughts?
Thank you,
Peter
Am 03.02.2017 um 13:07 schrieb Peter Lieven:
Quoted 8 lines
Hi,
I have a special use case of creating a dummy PCI device with a certain vendor/device ID. The device does not have to actually function, it just
has to be visible under lspci.
Quoted 7 lines
Any idea how to achieve this? I was thinking of modifying the edu pci device to make the device/vendor ID passable via cmdline.
Don't know if thats a good idea.
Any thoughts?
anyone?
Thanks,
Peter
Hi Peter,
This won't be easy unfortunately, at least not clean :). The vendor_id device_id are part of the PCIDeviceClass. So I _think_ you can't use a qom parameter for that. But... it seems that these fields are used firstly in pci_qdev_realize (to be checked) so maybe it's okay to change them later before the device is realized with a parameter..
This is really hackish.. sorry.. but that's a though :).
Fred
Quoted 26 lines · Peter Lieven
Am 03.02.2017 um 13:07 schrieb Peter Lieven:
Quoted 10 lines
Hi,
I have a special use case of creating a dummy PCI device with a certain vendor/device ID. The device does not have to actually function, it just
has to be visible under lspci.
Quoted 8 lines
Any idea how to achieve this? I was thinking of modifying the edu pci device to make the device/vendor ID passable via cmdline.
Don't know if thats a good idea.
Any thoughts?
anyone?
Thanks,
Peter