Skip to content

Commit 1629ee1

Browse files
Shijith Thottonmstsirkin
authored andcommitted
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. Acked-by: Jason Wang <[email protected]> Signed-off-by: Shijith Thotton <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 59e4571 commit 1629ee1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

include/uapi/linux/virtio_pci.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@
116116
#define VIRTIO_PCI_CAP_PCI_CFG 5
117117
/* Additional shared memory capability */
118118
#define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8
119+
/* PCI vendor data configuration */
120+
#define VIRTIO_PCI_CAP_VENDOR_CFG 9
119121

120122
/* This is the PCI capability header: */
121123
struct virtio_pci_cap {
@@ -130,6 +132,18 @@ struct virtio_pci_cap {
130132
__le32 length; /* Length of the structure, in bytes. */
131133
};
132134

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+
133147
struct virtio_pci_cap64 {
134148
struct virtio_pci_cap cap;
135149
__le32 offset_hi; /* Most sig 32 bits of offset */

0 commit comments

Comments
 (0)