diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2019-08-23 06:42:03 -0400 |
---|---|---|
committer | Felipe Franciosi <felipe@nutanix.com> | 2019-09-05 16:45:35 +0100 |
commit | f6b3be959cba675dee76522447fcd507f204e161 (patch) | |
tree | 29a04330eebf37c97fca13c372082cde816c0ea6 /lib/pci.h | |
parent | 277be873b5bdafe71e9b1f3d71efd17e2b9b917f (diff) | |
download | libvfio-user-f6b3be959cba675dee76522447fcd507f204e161.zip libvfio-user-f6b3be959cba675dee76522447fcd507f204e161.tar.gz libvfio-user-f6b3be959cba675dee76522447fcd507f204e161.tar.bz2 |
rename PCI config space sizes to match the ones from pci_regs.h
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/pci.h')
-rw-r--r-- | lib/pci.h | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -59,9 +59,12 @@ typedef enum { LM_DBG } lm_log_lvl_t; -/* TODO these could go in pci_regs.h */ -#define PCI_CONFIG_SPACE_SIZEOF 0x100 -#define PCI_EXTENDED_CONFIG_SPACE_SIZEOF 0x1000 +/* + * These are already defined in include/uapi/linux/pci_regs.h, however that + * file doesn't seem to installed. + */ +#define PCI_CFG_SPACE_SIZE 256 +#define PCI_CFG_SPACE_EXP_SIZE 4096 enum { LM_DEV_BAR0_REG_IDX, @@ -213,14 +216,14 @@ typedef union { _Static_assert(sizeof(lm_pci_hdr_t) == 0x40, "bad PCI header size"); typedef struct { - uint8_t raw[PCI_CONFIG_SPACE_SIZEOF - PCI_STD_HEADER_SIZEOF]; + uint8_t raw[PCI_CFG_SPACE_SIZE - PCI_STD_HEADER_SIZEOF]; } __attribute__ ((packed)) lm_pci_non_std_config_space_t; _Static_assert(sizeof(lm_pci_non_std_config_space_t) == 0xc0, "bad non-standard PCI configuration space size"); struct lm_pci_config_space { union { - uint8_t raw[PCI_CONFIG_SPACE_SIZEOF]; + uint8_t raw[PCI_CFG_SPACE_SIZE]; struct { lm_pci_hdr_t hdr; lm_pci_non_std_config_space_t non_std; |