- Receiving mmap flags from userspace which was previously explored[0], and proposed approach is to expose an ioctl uAPI to allow userspace to set flags for a range. There was also discussion around differentiating WC from prefetchable memory â?? which makes sense â?? and letting userspace explicitly choose which region to use WC. - Dealing with legacy regions & drivers created regions, this could be handled as suggested[1] from Jason using maple tree, which I'm implementing to insert flags entry of the range to be mmapped, since this would give us the flexibility to set the flags of any ranges. - Scoping the mmap flags locally per request instead of defining it globally on vfio_device/vfio_pci_core_device. This afaict from the code could be handled if vfio_device_file struct is used with the vfio_device_ops instead of the vfio_device, specifically the mmap & ioctl since these the ops of interest here, so that we could access it there and have a per fd maple tree to keep the flags in. This will also keep the life time of the flags to the FD not to the device which I think is better in this case. Since I'm in the middle of investigating & implementing this topic, I would like to collect opinions on the approach so far, specially the last point. better ideas or objections with dealing with local flags using vfio_device_file or other points would be appreciated. [0]: https://lore.kernel.org/kvm/20240731155352.3973857-1-kbusch@xxxxxxxx/ [1]: https://lore.kernel.org/kvm/20240801141914.GC3030761@xxxxxxxx/ Regards, 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