mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
vfio: selftests: Replicate tests across all iommu_modes
Automatically replicate vfio_dma_mapping_test and vfio_pci_driver_test across all supported IOMMU modes using fixture variants. Both of these tests exercise DMA mapping to some degree so having automatic coverage across all IOMMU modes will help catch bugs. Acked-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20250822212518.4156428-26-dmatlack@google.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
committed by
Alex Williamson
parent
5df9bd6205
commit
892aff147a
@@ -53,6 +53,14 @@ struct vfio_iommu_mode {
|
||||
unsigned long iommu_type;
|
||||
};
|
||||
|
||||
/*
|
||||
* Generator for VFIO selftests fixture variants that replicate across all
|
||||
* possible IOMMU modes. Tests must define FIXTURE_VARIANT_ADD_IOMMU_MODE()
|
||||
* which should then use FIXTURE_VARIANT_ADD() to create the variant.
|
||||
*/
|
||||
#define FIXTURE_VARIANT_ADD_ALL_IOMMU_MODES(...) \
|
||||
FIXTURE_VARIANT_ADD_IOMMU_MODE(vfio_type1_iommu, ##__VA_ARGS__)
|
||||
|
||||
struct vfio_pci_bar {
|
||||
struct vfio_region_info info;
|
||||
void *vaddr;
|
||||
|
||||
Reference in New Issue
Block a user