From: "Dr. David Alan Gilbert" <[email protected]>

For the shm capability we need to have multiple capabilities of the same
type, with different uses.  For this we need an 'id' field to
differentiate them.  Place this field in one of the spare bytes
of the header.

Suggested-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
---
 include/uapi/linux/virtio_pci.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h
index 31841a60a4ad..961bb6e6315c 100644
--- a/include/uapi/linux/virtio_pci.h
+++ b/include/uapi/linux/virtio_pci.h
@@ -123,7 +123,8 @@ struct virtio_pci_cap {
        __u8 cap_len;           /* Generic PCI field: capability length */
        __u8 cfg_type;          /* Identifies the structure. */
        __u8 bar;               /* Where to find it. */
-       __u8 padding[3];        /* Pad to full dword. */
+       __u8 id;                /* Multiple capabilities of the same type */
+       __u8 padding[2];        /* Pad to full dword. */
        __le32 offset;          /* Offset within bar. */
        __le32 length;          /* Length of the structure, in bytes. */
 };
-- 
2.21.0

Reply via email to