Re: [PATCH v7 1/3] s390/pci: Fix s390_mmio_read/write syscall page fault handling

From: Matthew Rosato
Date: Fri Feb 28 2025 - 16:56:59 EST


On 2/26/25 7:07 AM, Niklas Schnelle wrote:
> The s390 MMIO syscalls when using the classic PCI instructions do not
> cause a page fault when follow_pfnmap_start() fails due to the page not
> being present. Besides being a general deficiency this breaks vfio-pci's
> mmap() handling once VFIO_PCI_MMAP gets enabled as this lazily maps on
> first access. Fix this by following a failed follow_pfnmap_start() with
> fixup_user_page() and retrying the follow_pfnmap_start(). Also fix
> a VM_READ vs VM_WRITE mixup in the read syscall.
>
> Signed-off-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>

Reviewed-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>