From 1db5a3aad3c689be1255ed850ef8e3515ab461e8 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Tue, 6 Apr 2010 16:05:46 +0300 Subject: 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 --- hw/pci.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/pci.h') diff --git a/hw/pci.h b/hw/pci.h index 20c670e..625188c 100644 --- a/hw/pci.h +++ b/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); -- cgit v1.1