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

From: Eric Auger

Date: Mon Sep 07 2026 - 01:09:05 EST




On 9/6/26 2:33 PM, Abdifatah Suruur wrote:
> 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>

OK thanks!

Eric
>
> Thanks for the reviews.
>
> Abdifatah
>