Re: [RFC v4 05/11] vdpa: Support transferring virtual addressing during DMA mapping
From: Mika Penttilä <hidden>
Date: 2021-03-04 00:21:08
Also in:
linux-fsdevel, netdev
From: Mika Penttilä <hidden>
Date: 2021-03-04 00:21:08
Also in:
linux-fsdevel, netdev
On 3.3.2021 14.45, Yongji Xie wrote:
On Wed, Mar 3, 2021 at 6:52 PM Mika Penttilä [off-list ref] wrote:quoted
On 23.2.2021 13.50, Xie Yongji wrote:quoted
This patch introduces an attribute for vDPA device to indicate whether virtual address can be used. If vDPA device driver set it, vhost-vdpa bus driver will not pin user page and transfer userspace virtual address instead of physical address during DMA mapping. And corresponding vma->vm_file and offset will be also passed as an opaque pointer.In the virtual addressing case, who is then responsible for the pinning or even mapping physical pages to the vaddr?Actually there's no need to pin the physical pages any more in this case. The vDPA device should be able to access the user space memory with virtual address if this attribute is set to true. For example, in VDUSE case, we will make use of the vma->vm_file to support sharing the memory between VM and VDUSE daemon. Thanks, Yongji
Ah ok you have a shared file pointer + offset. thanks, Mika