diff options
Diffstat (limited to 'include/pci_caps/common.h')
-rw-r--r-- | include/pci_caps/common.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/pci_caps/common.h b/include/pci_caps/common.h index a820f0d..b532e15 100644 --- a/include/pci_caps/common.h +++ b/include/pci_caps/common.h @@ -31,6 +31,7 @@ #ifndef LIB_VFIO_USER_PCI_CAPS_COMMON_H #define LIB_VFIO_USER_PCI_CAPS_COMMON_H +#include <linux/pci_regs.h> #include <stddef.h> #ifdef __cplusplus @@ -54,6 +55,24 @@ struct vsc { uint8_t data[]; } __attribute__ ((packed)); +/* + * PCI Express extended capability header. + */ +struct pcie_ext_cap_hdr { + unsigned int id:16; + unsigned int version:4; + unsigned int next:12; +} __attribute__((packed)); + +/* PCI Express vendor-specific capability header (PCIE 7.19) */ +struct pcie_ext_cap_vsc_hdr { + struct pcie_ext_cap_hdr hdr; + unsigned int id:16; + unsigned int rev:4; + unsigned int len:12; + uint8_t data[]; +} __attribute__((packed)); + #ifdef __cplusplus } #endif |