Added macro definition for VIRTIO_PCI_CAP_VENDOR_CFG to identify the PCI vendor data type in the virtio_pci_cap structure. Defined a new struct virtio_pci_vndr_data for the vendor data capability header as per the specification.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -116,6 +116,8 @@ · 115 unmodified lines | ||
| 116 | 116 | #define VIRTIO_PCI_CAP_PCI_CFG 5 |
| 117 | 117 | /* Additional shared memory capability */ |
| 118 | 118 | #define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8 |
| 119 | +/* PCI vendor data configuration */ | |
| 120 | +#define VIRTIO_PCI_CAP_VENDOR_CFG 9 | |
| 119 | 121 | |
| 120 | 122 | /* This is the PCI capability header: */ |
| 121 | 123 | struct virtio_pci_cap { |
| @@ -130,6 +132,18 @@ struct virtio_pci_cap { · 8 unmodified lines | ||
| 130 | 132 | __le32 length; /* Length of the structure, in bytes. */ |
| 131 | 133 | }; |
| 132 | 134 | |
| 135 | +/* This is the PCI vendor data capability header: */ | |
| 136 | +struct virtio_pci_vndr_data { | |
| 137 | + __u8 cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */ | |
| 138 | + __u8 cap_next; /* Generic PCI field: next ptr. */ | |
| 139 | + __u8 cap_len; /* Generic PCI field: capability length */ | |
| 140 | + __u8 cfg_type; /* Identifies the structure. */ | |
| 141 | + __u16 vendor_id; /* Identifies the vendor-specific format. */ | |
| 142 | + /* For Vendor Definition */ | |
| 143 | + /* Pads structure to a multiple of 4 bytes */ | |
| 144 | + /* Reads must not have side effects */ | |
| 145 | +}; | |
| 146 | + | |
| 133 | 147 | struct virtio_pci_cap64 { |
| 134 | 148 | struct virtio_pci_cap cap; |
| 135 | 149 | __le32 offset_hi; /* Most sig 32 bits of offset */ |