diff options
| author | Jiri Kosina <jkosina@suse.com> | 2026-02-09 17:33:26 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-02-09 17:33:26 +0100 |
| commit | ec496f77b4c11036cc835d6f045fb5e5ef1e6530 (patch) | |
| tree | e0f5a8f9ffec9de060b7b617514daecc8bdaca6d /include/uapi/linux/vfio.h | |
| parent | 984d6f361d19486fcd8fc13d29112fe73123f482 (diff) | |
| parent | ae40ace015be442837934c5028a8eba7fe3cd98f (diff) | |
Merge branch 'for-6.20/sony' into for-linus
- Support for Rock band 4 PS4 and PS5 guitars (Rosalie Wanders)
Diffstat (limited to 'include/uapi/linux/vfio.h')
| -rw-r--r-- | include/uapi/linux/vfio.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index 75100bf009ba..ac2329f24141 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h @@ -14,6 +14,7 @@ #include <linux/types.h> #include <linux/ioctl.h> +#include <linux/stddef.h> #define VFIO_API_VERSION 0 @@ -1478,6 +1479,33 @@ 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. + * + * flags should be 0. + * + * 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[] __counted_by(nr_ranges); +}; + /* -------- API for Type1 VFIO IOMMU -------- */ /** |
