[SRU][J:linux-bluefield][PATCH v1 4/6] UBUNTU: SAUCE: vfio/pci: Allow MMIO regions to be exported through dma-buf
William Tu
witu at nvidia.com
Tue Aug 27 15:41:04 UTC 2024
Thanks Jason. Will add a new ioctl.
From: Jason Gunthorpe <jgg at nvidia.com>
Date: Tuesday, August 27, 2024 at 8:29 AM
To: William Tu <witu at nvidia.com>
Cc: kernel-team at lists.ubuntu.com <kernel-team at lists.ubuntu.com>, Vladimir Sokolovsky <vlad at nvidia.com>, Bodong Wang <bodong at nvidia.com>, Sergey Gorenko <sergeygo at nvidia.com>
Subject: Re: [SRU][J:linux-bluefield][PATCH v1 4/6] UBUNTU: SAUCE: vfio/pci: Allow MMIO regions to be exported through dma-buf
On Mon, Aug 26, 2024 at 06:29:36PM +0000, William Tu wrote:
> +/**
> + * Upon VFIO_DEVICE_FEATURE_GET create a dma_buf fd for the
> + * region 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.
> + * If both are 0 then the whole region is used.
> + *
> + * Return: The fd number on success, -1 and errno is set on failure.
> + */
> +struct vfio_device_feature_dma_buf {
> + __u32 region_index;
> + __u32 open_flags;
> + __u32 offset;
> + __u64 length;
> +};
> +#define VFIO_DEVICE_FEATURE_DMA_BUF 3 // FIXME numbers wrong
This is what you can't do with an out of tree series
You need to give it some unique ioctl interface that will not
conflict with anything else. '3' is already used upstream IIRC.
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20240827/7b0b0667/attachment-0001.html>
More information about the kernel-team
mailing list