Commit Graph
4 Commits
Author SHA1 Message Date
Alex Mastro 03b7c2d763 vfio: selftests: Centralize IOMMU mode name definitions
Replace scattered string literals with MODE_* macros in iommu.h. This
provides a single source of truth for IOMMU mode name strings.

Signed-off-by: Alex Mastro <[email protected]>
Reviewed-by: David Matlack <[email protected]>
Tested-by: David Matlack <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
2026-01-19 10:06:29 -07:00
David Matlack 193120dddd vfio: selftests: Drop <uapi/linux/types.h> includes
Drop the <uapi/linux/types.h> includes now that <linux/types.h>
(tools/include/linux/types.h) has a definition for __aligned_le64, which
is needed by <linux/iommufd.h>.

Including <uapi/linux/types.h> is harmless but causes benign typedef
redefinitions. This is not a problem for VFIO selftests but becomes an
issue when the VFIO selftests library is built into KVM selftests, since
they are built with -std=gnu99 which does not allow typedef redifitions.

No functional change intended.

Signed-off-by: David Matlack <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
2025-12-23 14:17:13 -07:00
David Matlack b8e96c8805 vfio: selftests: Eliminate INVALID_IOVA
Eliminate INVALID_IOVA as there are platforms where UINT64_MAX is a
valid iova.

Reviewed-by: Alex Mastro <[email protected]>
Tested-by: Alex Mastro <[email protected]>
Reviewed-by: Raghavendra Rao Ananta <[email protected]>
Signed-off-by: David Matlack <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
2025-11-28 10:58:07 -07:00
David Matlack 5fabc49abf vfio: selftests: Split libvfio.h into separate header files
Split out the contents of libvfio.h into separate header files, but keep
libvfio.h as the top-level include that all tests can use.

Put all new header files into a libvfio/ subdirectory to avoid future
name conflicts in include paths when libvfio is used by other selftests
like KVM.

No functional change intended.

Reviewed-by: Alex Mastro <[email protected]>
Tested-by: Alex Mastro <[email protected]>
Reviewed-by: Raghavendra Rao Ananta <[email protected]>
Signed-off-by: David Matlack <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
2025-11-28 10:58:07 -07:00