History

virtio-pci: define type and header for PCI vendor data

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.

Shijith Thotton committed 1 year ago

Commit 1629ee11 parent 59e45711 file · +14 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/virtio_pci.h+14−0
@@ -116,6 +116,8 @@ · 115 unmodified lines
116#define VIRTIO_PCI_CAP_PCI_CFG 5116#define VIRTIO_PCI_CAP_PCI_CFG 5
117/* Additional shared memory capability */117/* Additional shared memory capability */
118#define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8118#define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8
119/* PCI vendor data configuration */
120#define VIRTIO_PCI_CAP_VENDOR_CFG 9
119 121
120/* This is the PCI capability header: */122/* This is the PCI capability header: */
121struct virtio_pci_cap {123struct virtio_pci_cap {
@@ -130,6 +132,18 @@ struct virtio_pci_cap { · 8 unmodified lines
130 __le32 length; /* Length of the structure, in bytes. */132 __le32 length; /* Length of the structure, in bytes. */
131};133};
132 134
135/* This is the PCI vendor data capability header: */
136struct 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
133struct virtio_pci_cap64 {147struct virtio_pci_cap64 {
134 struct virtio_pci_cap cap;148 struct virtio_pci_cap cap;
135 __le32 offset_hi; /* Most sig 32 bits of offset */149 __le32 offset_hi; /* Most sig 32 bits of offset */