]> git.ipfire.org Git - thirdparty/linux.git/commit
vfio: refactor vfio_pci_mmap_huge_fault function
authorAnkit Agrawal <ankita@nvidia.com>
Thu, 27 Nov 2025 17:06:27 +0000 (17:06 +0000)
committerAlex Williamson <alex@shazbot.org>
Fri, 28 Nov 2025 17:07:25 +0000 (10:07 -0700)
commit9b92bc7554b543dc00a0a0b62904a9ef2ad5c4b0
treeaa5788019990dc04f91cac82133568ad9d8760bc
parent590d745680309f8d956c3f0a97270fe65013b272
vfio: refactor vfio_pci_mmap_huge_fault function

Refactor vfio_pci_mmap_huge_fault to take out the implementation
to map the VMA to the PTE/PMD/PUD as a separate function.

Export the new function to be used by nvgrace-gpu module.

Move the alignment check code to verify that pfn and VMA VA is
aligned to the page order to the header file and make it inline.

No functional change is intended.

Cc: Shameer Kolothum <skolothumtho@nvidia.com>
Cc: Alex Williamson <alex@shazbot.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Reviewed-by: Shameer Kolothum <skolothumtho@nvidia.com>
Signed-off-by: Ankit Agrawal <ankita@nvidia.com>
Link: https://lore.kernel.org/r/20251127170632.3477-2-ankita@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/pci/vfio_pci_core.c
include/linux/vfio_pci_core.h