mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 08:45:26 -05:00
Integrate the selftests as part of kunit.
Now instead of the test only being run at boot, it can run:
- With CONFIG_IOMMU_IO_PGTABLE_LPAE_KUNIT_TEST=y
It will automatically run at boot as before.
- Otherwise with CONFIG_IOMMU_IO_PGTABLE_LPAE_KUNIT_TEST=m:
1) on module load:
Once the module load the self test will run
# modprobe io-pgtable-arm-selftests
2) debugfs
With CONFIG_KUNIT_DEBUGFS=y You can run the test with
# echo 1 > /sys/kernel/debug/kunit/io-pgtable-arm-test/run
3) Using kunit.py
You can also use the helper script which uses Qemu in the background
# ./tools/testing/kunit/kunit.py run --build_dir build_kunit_arm64 --arch arm64 \
--make_options LLVM=1 --kunitconfig ./kunit/kunitconfig
[18:01:09] ============= io-pgtable-arm-test (1 subtest) ==============
[18:01:09] [PASSED] arm_lpae_do_selftests
[18:01:09] =============== [PASSED] io-pgtable-arm-test ===============
[18:01:09] ============================================================
Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
39 lines
1.6 KiB
Makefile
39 lines
1.6 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
obj-y += arm/ iommufd/
|
|
obj-$(CONFIG_AMD_IOMMU) += amd/
|
|
obj-$(CONFIG_INTEL_IOMMU) += intel/
|
|
obj-$(CONFIG_RISCV_IOMMU) += riscv/
|
|
obj-$(CONFIG_GENERIC_PT) += generic_pt/fmt/
|
|
obj-$(CONFIG_IOMMU_API) += iommu.o
|
|
obj-$(CONFIG_IOMMU_SUPPORT) += iommu-pages.o
|
|
obj-$(CONFIG_IOMMU_API) += iommu-traces.o
|
|
obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
|
|
obj-$(CONFIG_IOMMU_DEBUGFS) += iommu-debugfs.o
|
|
obj-$(CONFIG_IOMMU_DMA) += dma-iommu.o
|
|
obj-$(CONFIG_IOMMU_IO_PGTABLE) += io-pgtable.o
|
|
obj-$(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) += io-pgtable-arm-v7s.o
|
|
obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o
|
|
obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE_KUNIT_TEST) += io-pgtable-arm-selftests.o
|
|
obj-$(CONFIG_IOMMU_IO_PGTABLE_DART) += io-pgtable-dart.o
|
|
obj-$(CONFIG_IOMMU_IOVA) += iova.o
|
|
obj-$(CONFIG_OF_IOMMU) += of_iommu.o
|
|
obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
|
|
obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
|
|
obj-$(CONFIG_IRQ_REMAP) += irq_remapping.o
|
|
obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
|
|
obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
|
|
obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
|
|
obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
|
|
obj-$(CONFIG_ROCKCHIP_IOMMU) += rockchip-iommu.o
|
|
obj-$(CONFIG_SUN50I_IOMMU) += sun50i-iommu.o
|
|
obj-$(CONFIG_TEGRA_IOMMU_SMMU) += tegra-smmu.o
|
|
obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o
|
|
obj-$(CONFIG_FSL_PAMU) += fsl_pamu.o fsl_pamu_domain.o
|
|
obj-$(CONFIG_S390_IOMMU) += s390-iommu.o
|
|
obj-$(CONFIG_HYPERV_IOMMU) += hyperv-iommu.o
|
|
obj-$(CONFIG_VIRTIO_IOMMU) += virtio-iommu.o
|
|
obj-$(CONFIG_IOMMU_SVA) += iommu-sva.o
|
|
obj-$(CONFIG_IOMMU_IOPF) += io-pgfault.o
|
|
obj-$(CONFIG_SPRD_IOMMU) += sprd-iommu.o
|
|
obj-$(CONFIG_APPLE_DART) += apple-dart.o
|