]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/mm/hmm-tests: test pagemap reads of PMD device-private entries
authorDev Jain <dev.jain@arm.com>
Thu, 4 Jun 2026 05:53:06 +0000 (05:53 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 9 Jun 2026 01:21:33 +0000 (18:21 -0700)
commite3d8707358ea76b78bdec9928937bb9a797f2c8f
tree97fcff54263fae5974012a80467b6cb1fcb19705
parentcd1fc0e3c1f67c0c31dfc215e5d9b771133dedc0
selftests/mm/hmm-tests: test pagemap reads of PMD device-private entries

To cover pagemap paths scanning PMD entries, add assertions to check
whether a device-private PMD entry has the correct pagemap information -
the PM_SWAP bit must be on in the pagemap entry.  Before that, we must
assert through HMM_DMIRROR_SNAPSHOT snapshot that the leaf entry is at PMD
level and not PTE level.

Link: https://lore.kernel.org/20260604055308.1947679-3-dev.jain@arm.com
Signed-off-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Lorenzo Stoakes <ljs@kernel.org>
Cc: Balbir Singh <balbirs@nvidia.com>
Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: Oscar Salvador (SUSE) <osalvador@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/hmm-tests.c