Re: [PATCH 4/5] vfio: Introduce vfio_device_ops.get_unmapped_area hook

David Hildenbrand
2025-06-13T18:03:38Z

On 13.06.25 15:41, Peter Xu wrote:
> Add a hook to vfio_device_ops to allow sub-modules provide virtual
> addresses for an mmap() request.
>
> Note that the fallback will be mm_get_unmapped_area(), which should
> maintain the old behavior of generic VA allocation (__get_unmapped_area).
> It's a bit unfortunate that is needed, as the current get_unmapped_area()
> file ops cannot support a retval which fallbacks to the default. So that
> is needed both here and whenever sub-module will opt-in with its own.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---

Reviewed-by: David Hildenbrand <david@redhat.com>

--
Cheers,

David / dhildenb