Re: [PATCH] vfio/platform: keep logical vm_pgoff in MMIO region mmap

From: Abdifatah Suruur

Date: Sun Sep 06 2026 - 08:33:58 EST


On 9/4/26 16:52, Eric Auger wrote:
> While at it, don't you want to fix the same pattern in cdx/main.c,
> fsl-mc/vfio_fsl_mc.c?

Yes - sent as separate patches for both drivers:

- [PATCH] vfio/fsl-mc: keep logical vm_pgoff in MMIO region mmap
<20260903092922.470-1-suruurism@xxxxxxxxx>
- [PATCH] vfio/cdx: keep logical vm_pgoff in MMIO region mmap
<20260903092932.526-1-suruurism@xxxxxxxxx>

And a follow-up for the cdx mmap path: MAP_PRIVATE mappings go through
the COW special case in get_remap_pgoff(), which overwrites vm_pgoff
with the raw PFN regardless of the mmap_mmio change, so vfio_cdx_mmap()
needs the VM_SHARED guard the other drivers already have:

- [PATCH] vfio/cdx: reject non-shared MMIO mmaps
<20260906123245.10884-1-suruurism@xxxxxxxxx>

Thanks for the reviews.

Abdifatah