Re: [RFC PATCH 0/9] vfio: Introduce mmap maple tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Aug 2025 10:53:24 +0200
Mahmoud Nagy Adam <mngyadam@xxxxxxxxx> wrote:

> Hi all,
> 
> Since it looks like creating alias regions is the path forward, I’d like
> to summarize the discussion to make sure we’re all aligned. From my
> understanding, the main steps are:
> 
>     - Introduce helpers to create compact offsets, likely leveraging
>     mt. No changes to the vfio ops APIs are required, since the mt should
>     live within the vfio struct itself.

I think we also established, or at least there were arguments in the
direction, that the maple tree is just an implementation detail of the
address space management.  Obviously it contributes to compact and
efficient use of the address space, but for small numbers of alias
regions, we could continue to use the upper bits of the offset,
returning -ENOSPC if exceeded.  I don't want to discourage the maple
tree, but it seems like it could be split to a separate series to me.

With the maple tree, an opt-in to continue to use the existing offsets
for the pre-defined vfio-pci region indexes could prove to be a useful
feature as well as we potentially learn about userspace drivers that
don't follow the ABI.

>     - Add a WC flag to regions.

If we go the route of the DEVICE_FEATURE, we have the PROBE as an
option here.  This might make sense if we to avoid redefining flags for
specific attributes between REGION_INFO and the new DEVICE_FEATURE uAPI.

>     - Define a new UAPI for creating alias regions with new
>     offsets. This UAPI should support aliasing existing regions as well
>     as specifying additional flags such as WC.

I thought we'd discussed de-duplication, ie. if a user asks for an alias
with the same attributes as already defined, they get back the existing
region index/offset.  I don't see the utility in creating an arbitrary
number of aliases with the same attributes.  Thanks,

Alex

>     - Enable WC support for mmap.
> 
> I plan to start working on an RFC covering these points over the next
> 1–2 weeks.
> 
> Thanks,
> MNAdam
> 
> 
> 
> Amazon Web Services Development Center Germany GmbH
> Tamara-Danz-Str. 13
> 10243 Berlin
> Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
> Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
> Sitz: Berlin
> Ust-ID: DE 365 538 597






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux