linux/tools/testing/selftests/vfio/lib
Alex Mastro 557dbdf6c4 vfio: selftests: Align BAR mmaps for efficient IOMMU mapping
Update vfio_pci_bar_map() to align BAR mmaps for efficient huge page
mappings. The manual mmap alignment can be removed once mmap(!MAP_FIXED)
on vfio device fds improves to automatically return well-aligned
addresses.

Also add MADV_HUGEPAGE, which encourages the kernel to use huge pages
(e.g. when /sys/kernel/mm/transparent_hugepage/enabled is set to "madvise").

Drop MAP_FILE from mmap(). It is an ignored compatibility flag.

Signed-off-by: Alex Mastro <amastro@fb.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Tested-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20260114-map-mmio-test-v3-2-44e036d95e64@fb.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
2026-01-19 10:06:30 -07:00
..
drivers vfio: selftests: Rename vfio_util.h to libvfio.h 2025-11-28 10:58:07 -07:00
include vfio: selftests: Align BAR mmaps for efficient IOMMU mapping 2026-01-19 10:06:30 -07:00
iommu.c vfio: selftests: Centralize IOMMU mode name definitions 2026-01-19 10:06:29 -07:00
iova_allocator.c vfio: selftests: Drop <uapi/linux/types.h> includes 2025-12-23 14:17:13 -07:00
libvfio.c vfio: selftests: Align BAR mmaps for efficient IOMMU mapping 2026-01-19 10:06:30 -07:00
libvfio.mk vfio: selftests: Move vfio_selftests_*() helpers into libvfio.c 2025-11-28 10:58:07 -07:00
vfio_pci_device.c vfio: selftests: Align BAR mmaps for efficient IOMMU mapping 2026-01-19 10:06:30 -07:00
vfio_pci_driver.c Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00