Re: Should linuxkpi linux_file_ioctl support flexible array copy?

"Bjoern A. Zeeb" <[email protected]>
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <[email protected]>
On Sun, 15 Feb 2026, yi zishun wrote:

> Hi,
> Thanks for the questions!
>
>
> On Sat, Feb 14, 2026 at 11:20:58PM +0000, Bjoern A. Zeeb wrote:
>>
>> Let me ask two totally different questions:
>>
>> (a) is this udmabuf or u-dma-buf?
>
> It is the mainline linux udmabuf driver
> (linux/drivers/dma-buf/udmabuf.c)
>
>
>> (b) what are the expected consumers for your code?
>
> The primary consumer is QEMU. When passing the `-device
> virtio-gpu-pci,blob=true` parameter to launch QEMU, it allows the host
> compositor to import the DMA-BUF directly (zero-copy), instead of having
> to do an explicit GPU upload when using shared memory (shm).
>
> It is a project I see in the SummerOfCodeIdeas page. Details are in
> https://wiki.freebsd.org/SummerOfCodeIdeas#Port_or_reimplement_udmabuf

Ok, I'll leave it to Aymeric as I do not fully understand how all these things
are layered and glued together.

I was mostly curious to find out if/why this would be LinuxKPI code, or why
we would need the LinuxKPI interface/structures for this?

I am currently assuming that the main benefit would be if using some
virtio-drm driver and wanting to display the guest FB locally on the host
or in a GPU VF/PF setup rather than streaming it away?  But there's a
missing piece to the puzzle for me still.

That said, it all sounds totally exciting :)


-- 
Bjoern A. Zeeb                                                     r15:7
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.