From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org, alex.williamson@redhat.com,
peterx@redhat.com, eric.auger@redhat.com
Subject: [Qemu-devel] [PATCH 4/5] vfio: Update linux header
Date: Wed, 28 Feb 2018 13:46:00 -0700 [thread overview]
Message-ID: <20180228204600.26629.36569.stgit@gimli.home> (raw)
In-Reply-To: <20180228201837.26629.3346.stgit@gimli.home>
Update with proposed ioeventfd API.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
| 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
--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 -------- */
/**
next prev parent reply other threads:[~2018-02-28 20:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 20:45 [Qemu-devel] [PATCH 0/5] vfio/quirks: ioeventfd support Alex Williamson
2018-02-28 20:45 ` [Qemu-devel] [PATCH 1/5] vfio/quirks: Add common quirk alloc helper Alex Williamson
2018-03-07 7:04 ` Peter Xu
2018-02-28 20:45 ` [Qemu-devel] [PATCH 2/5] vfio/quirks: Add quirk reset callback Alex Williamson
2018-03-07 7:04 ` Peter Xu
2018-02-28 20:45 ` [Qemu-devel] [PATCH 3/5] vfio/quirks: ioeventfd quirk acceleration Alex Williamson
2018-03-07 7:06 ` Peter Xu
2018-02-28 20:46 ` Alex Williamson [this message]
2018-02-28 20:46 ` [Qemu-devel] [PATCH 5/5] vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly Alex Williamson
2018-03-13 14:38 ` [Qemu-devel] [PATCH 0/5] vfio/quirks: ioeventfd support Auger Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180228204600.26629.36569.stgit@gimli.home \
--to=alex.williamson@redhat.com \
--cc=eric.auger@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).