From: Vivek Kasireddy <vivek.kasireddy@intel.com>
To: qemu-devel@nongnu.org
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Subject: [PATCH v1 5/7] linux-headers: Update vfio.h to include VFIO_DEVICE_FEATURE_DMA_BUF
Date: Fri, 3 Oct 2025 16:35:58 -0700 [thread overview]
Message-ID: <20251003234138.85820-6-vivek.kasireddy@intel.com> (raw)
In-Reply-To: <20251003234138.85820-1-vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
| 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
--git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index 79bf8c0cc5..d2177c9cba 100644
--- a/linux-headers/linux/vfio.h
+++ b/linux-headers/linux/vfio.h
@@ -1468,6 +1468,31 @@ struct vfio_device_feature_bus_master {
};
#define VFIO_DEVICE_FEATURE_BUS_MASTER 10
+/**
+ * Upon VFIO_DEVICE_FEATURE_GET create a dma_buf fd for the
+ * regions selected.
+ *
+ * open_flags are the typical flags passed to open(2), eg O_RDWR, O_CLOEXEC,
+ * etc. offset/length specify a slice of the region to create the dmabuf from.
+ * nr_ranges is the total number of (P2P DMA) ranges that comprise the dmabuf.
+ *
+ * Return: The fd number on success, -1 and errno is set on failure.
+ */
+#define VFIO_DEVICE_FEATURE_DMA_BUF 11
+
+struct vfio_region_dma_range {
+ __u64 offset;
+ __u64 length;
+};
+
+struct vfio_device_feature_dma_buf {
+ __u32 region_index;
+ __u32 open_flags;
+ __u32 flags;
+ __u32 nr_ranges;
+ struct vfio_region_dma_range dma_ranges[];
+};
+
/* -------- API for Type1 VFIO IOMMU -------- */
/**
--
2.50.1
next prev parent reply other threads:[~2025-10-03 23:45 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 23:35 [PATCH v1 0/7] vfio: Implement VFIO_DEVICE_FEATURE_DMA_BUF and use it in virtio-gpu Vivek Kasireddy
2025-10-03 23:35 ` [PATCH v1 1/7] virtio-gpu: Recreate the resource's dmabuf if new backing is attached Vivek Kasireddy
2025-10-14 4:36 ` Akihiko Odaki
2025-10-15 4:56 ` Kasireddy, Vivek
2025-10-03 23:35 ` [PATCH v1 2/7] virtio-gpu: Don't rely on res->blob to identify blob resources Vivek Kasireddy
2025-10-10 4:19 ` Akihiko Odaki
2025-10-13 6:54 ` Kasireddy, Vivek
2025-10-14 4:15 ` Akihiko Odaki
2025-10-15 5:07 ` Kasireddy, Vivek
2025-10-15 6:11 ` Akihiko Odaki
2025-10-15 12:08 ` Akihiko Odaki
2025-10-16 5:41 ` Kasireddy, Vivek
2025-10-16 6:50 ` Akihiko Odaki
2025-10-17 5:58 ` Kasireddy, Vivek
2025-10-17 12:18 ` Akihiko Odaki
2025-10-20 6:40 ` Kasireddy, Vivek
2025-10-21 4:19 ` Akihiko Odaki
2025-10-22 5:10 ` Kasireddy, Vivek
2025-10-23 5:22 ` Akihiko Odaki
2025-10-24 6:08 ` Kasireddy, Vivek
2025-10-16 5:36 ` Kasireddy, Vivek
2025-10-03 23:35 ` [PATCH v1 3/7] virtio-gpu: Find hva for Guest's DMA addr associated with a ram device Vivek Kasireddy
2025-10-14 4:38 ` Akihiko Odaki
2025-10-15 4:55 ` Kasireddy, Vivek
2025-10-03 23:35 ` [PATCH v1 4/7] vfio/region: Add a helper to get region index from memory region Vivek Kasireddy
2025-10-06 8:26 ` Cédric Le Goater
2025-10-07 4:50 ` Kasireddy, Vivek
2025-10-07 9:05 ` Cédric Le Goater
2025-10-03 23:35 ` Vivek Kasireddy [this message]
2025-10-03 23:35 ` [PATCH v1 6/7] vfio/device: Add support for VFIO_DEVICE_FEATURE_DMA_BUF Vivek Kasireddy
2025-10-06 8:24 ` Cédric Le Goater
2025-10-07 4:48 ` Kasireddy, Vivek
2025-10-03 23:36 ` [PATCH v1 7/7] virtio-gpu-udmabuf: Create dmabuf for blobs associated with VFIO devices Vivek Kasireddy
2025-10-06 15:59 ` Cédric Le Goater
2025-10-07 4:53 ` Kasireddy, Vivek
2025-10-07 6:51 ` Cédric Le Goater
2025-10-10 4:53 ` Akihiko Odaki
2025-10-13 7:00 ` Kasireddy, Vivek
2025-10-14 4:49 ` Akihiko Odaki
2025-10-15 4:54 ` Kasireddy, Vivek
2025-10-15 5:06 ` Akihiko Odaki
2025-10-16 5:31 ` Kasireddy, Vivek
2025-10-06 15:28 ` [PATCH v1 0/7] vfio: Implement VFIO_DEVICE_FEATURE_DMA_BUF and use it in virtio-gpu Cédric Le Goater
2025-10-07 4:51 ` Kasireddy, Vivek
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=20251003234138.85820-6-vivek.kasireddy@intel.com \
--to=vivek.kasireddy@intel.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).