mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
pci: add API to add capability at a known offset
Unlike virtio, device emulations need to add pci capabilities at known offsets to match real hardware. Make this possible by adding an appropriate API. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
f62719ca6f
commit
1db5a3aad3
2 changed files with 15 additions and 4 deletions
2
hw/pci.h
2
hw/pci.h
|
@ -190,6 +190,8 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num,
|
|||
PCIMapIORegionFunc *map_func);
|
||||
|
||||
int pci_add_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size);
|
||||
int pci_add_capability_at_offset(PCIDevice *pci_dev, uint8_t cap_id,
|
||||
uint8_t cap_offset, uint8_t cap_size);
|
||||
|
||||
void pci_del_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue