aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAlex Williamson <[email protected]>2023-05-19 15:47:48 -0600
committerAlex Williamson <[email protected]>2023-06-16 12:22:18 -0600
commita5bfe22db2a4a1ae467f31cfa1d72043eb9f1877 (patch)
tree04c8a04ce7342bef61fddebc053316391c763281 /include/uapi/linux
parentd9824f70e52c736498c9177688cee5aa789e560c (diff)
vfio/pci-core: Add capability for AtomicOp completer support
Test and enable PCIe AtomicOp completer support of various widths and report via device-info capability to userspace. Reviewed-by: Cédric Le Goater <[email protected]> Reviewed-by: Robin Voetter <[email protected]> Tested-by: Robin Voetter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/vfio.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 1a36134cae5c..4f48bad09a37 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -240,6 +240,20 @@ struct vfio_device_info {
#define VFIO_DEVICE_INFO_CAP_ZPCI_UTIL 3
#define VFIO_DEVICE_INFO_CAP_ZPCI_PFIP 4
+/*
+ * The following VFIO_DEVICE_INFO capability reports support for PCIe AtomicOp
+ * completion to the root bus with supported widths provided via flags.
+ */
+#define VFIO_DEVICE_INFO_CAP_PCI_ATOMIC_COMP 5
+struct vfio_device_info_cap_pci_atomic_comp {
+ struct vfio_info_cap_header header;
+ __u32 flags;
+#define VFIO_PCI_ATOMIC_COMP32 (1 << 0)
+#define VFIO_PCI_ATOMIC_COMP64 (1 << 1)
+#define VFIO_PCI_ATOMIC_COMP128 (1 << 2)
+ __u32 reserved;
+};
+
/**
* VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,
* struct vfio_region_info)