]> git.proxmox.com Git - mirror_qemu.git/blobdiff - linux-headers/linux/vfio.h
linux-headers: update to v6.5-rc1
[mirror_qemu.git] / linux-headers / linux / vfio.h
index 4a534edbdcba8d172b9b58615ca8f6ffe82f9ff5..16db89071eabdea7166cbbe20c4dee3130360be6 100644 (file)
@@ -213,6 +213,7 @@ struct vfio_device_info {
 #define VFIO_DEVICE_FLAGS_AP   (1 << 5)        /* vfio-ap device */
 #define VFIO_DEVICE_FLAGS_FSL_MC (1 << 6)      /* vfio-fsl-mc device */
 #define VFIO_DEVICE_FLAGS_CAPS (1 << 7)        /* Info supports caps */
+#define VFIO_DEVICE_FLAGS_CDX  (1 << 8)        /* vfio-cdx device */
        __u32   num_regions;    /* Max region index + 1 */
        __u32   num_irqs;       /* Max IRQ index + 1 */
        __u32   cap_offset;     /* Offset within info struct of first cap */
@@ -240,6 +241,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)
@@ -511,6 +526,9 @@ struct vfio_region_info_cap_nvlink2_lnkspd {
  * then add and unmask vectors, it's up to userspace to make the decision
  * whether to allocate the maximum supported number of vectors or tear
  * down setup and incrementally increase the vectors as each is enabled.
+ * Absence of the NORESIZE flag indicates that vectors can be enabled
+ * and disabled dynamically without impacting other vectors within the
+ * index.
  */
 struct vfio_irq_info {
        __u32   argsz;
@@ -646,6 +664,15 @@ enum {
        VFIO_CCW_NUM_IRQS
 };
 
+/*
+ * The vfio-ap bus driver makes use of the following IRQ index mapping.
+ * Unimplemented IRQ types return a count of zero.
+ */
+enum {
+       VFIO_AP_REQ_IRQ_INDEX,
+       VFIO_AP_NUM_IRQS
+};
+
 /**
  * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 12,
  *                                           struct vfio_pci_hot_reset_info)