Skip to content

Commit b2ef9f5

Browse files
Ralph Campbelljgunthorpe
authored andcommitted
mm/hmm/test: add selftest driver for HMM
This driver is for testing device private memory migration and devices which use hmm_range_fault() to access system memory via device page tables. Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ralph Campbell <[email protected]> Signed-off-by: Jérôme Glisse <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Yongjun <[email protected]> Link: https://lore.kernel.org/r/20200511183704.GA225608@mwanda Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 2733ea1 commit b2ef9f5

File tree

4 files changed

+1237
-0
lines changed

4 files changed

+1237
-0
lines changed

lib/Kconfig.debug

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,6 +2201,19 @@ config TEST_MEMINIT
22012201

22022202
If unsure, say N.
22032203

2204+
config TEST_HMM
2205+
tristate "Test HMM (Heterogeneous Memory Management)"
2206+
depends on TRANSPARENT_HUGEPAGE
2207+
depends on DEVICE_PRIVATE
2208+
select HMM_MIRROR
2209+
select MMU_NOTIFIER
2210+
help
2211+
This is a pseudo device driver solely for testing HMM.
2212+
Say M here if you want to build the HMM test module.
2213+
Doing so will allow you to run tools/testing/selftest/vm/hmm-tests.
2214+
2215+
If unsure, say N.
2216+
22042217
endif # RUNTIME_TESTING_MENU
22052218

22062219
config MEMTEST

lib/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ obj-$(CONFIG_TEST_STACKINIT) += test_stackinit.o
9292
obj-$(CONFIG_TEST_BLACKHOLE_DEV) += test_blackhole_dev.o
9393
obj-$(CONFIG_TEST_MEMINIT) += test_meminit.o
9494
obj-$(CONFIG_TEST_LOCKUP) += test_lockup.o
95+
obj-$(CONFIG_TEST_HMM) += test_hmm.o
9596

9697
obj-$(CONFIG_TEST_LIVEPATCH) += livepatch/
9798

0 commit comments

Comments
 (0)