qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/5] vfio: Update linux header


From: Alex Williamson
Subject: [Qemu-devel] [PATCH 4/5] vfio: Update linux header
Date: Wed, 28 Feb 2018 13:46:00 -0700
User-agent: StGit/0.18-102-gdf9f

Update with proposed ioeventfd API.

Signed-off-by: Alex Williamson <address@hidden>
---
 linux-headers/linux/vfio.h |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index 4312e961ffd3..c9d7e2db132e 100644
--- a/linux-headers/linux/vfio.h
+++ b/linux-headers/linux/vfio.h
@@ -503,6 +503,33 @@ struct vfio_pci_hot_reset {
 
 #define VFIO_DEVICE_PCI_HOT_RESET      _IO(VFIO_TYPE, VFIO_BASE + 13)
 
+/**
+ * VFIO_DEVICE_IOEVENTFD - _IOW(VFIO_TYPE, VFIO_BASE + 16,
+ *                              struct vfio_device_ioeventfd)
+ *
+ * Perform a write to the device at the specified device fd offset, with
+ * the specified data and width when the provided eventfd is triggered.
+ * vfio bus drivers may not support this for all regions, or at all.
+ * vfio-pci currently only enables support for BAR regions and excludes
+ * the MSI-X vector table.
+ *
+ * Return: 0 on success, -errno on failure.
+ */
+struct vfio_device_ioeventfd {
+       __u32   argsz;
+       __u32   flags;
+#define VFIO_DEVICE_IOEVENTFD_8                (1 << 0) /* 1-byte write */
+#define VFIO_DEVICE_IOEVENTFD_16       (1 << 1) /* 2-byte write */
+#define VFIO_DEVICE_IOEVENTFD_32       (1 << 2) /* 4-byte write */
+#define VFIO_DEVICE_IOEVENTFD_64       (1 << 3) /* 8-byte write */
+#define VFIO_DEVICE_IOEVENTFD_SIZE_MASK        (0xf)
+       __u64   offset;                 /* device fd offset of write */
+       __u64   data;                   /* data to be written */
+       __s32   fd;                     /* -1 for de-assignment */
+};
+
+#define VFIO_DEVICE_IOEVENTFD          _IO(VFIO_TYPE, VFIO_BASE + 16)
+
 /* -------- API for Type1 VFIO IOMMU -------- */
 
 /**




reply via email to

[Prev in Thread] Current Thread [Next in Thread]