OSDN Git Service

KVM: selftests: aarch64: Add aarch64/page_fault_test
authorRicardo Koller <ricarkol@google.com>
Mon, 17 Oct 2022 19:58:30 +0000 (19:58 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Nov 2022 19:10:27 +0000 (19:10 +0000)
commit35c5810157124cb71aaa939cd2d5508192714877
treeb5e749cafb36f4ee2f1bf990769e5dd56c7e6de2
parent1446e331432d7f24ed56b870ad605a4345fee43f
KVM: selftests: aarch64: Add aarch64/page_fault_test

Add a new test for stage 2 faults when using different combinations of
guest accesses (e.g., write, S1PTW), backing source type (e.g., anon)
and types of faults (e.g., read on hugetlbfs with a hole). The next
commits will add different handling methods and more faults (e.g., uffd
and dirty logging). This first commit starts by adding two sanity checks
for all types of accesses: AF setting by the hw, and accessing memslots
with holes.

Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221017195834.2295901-11-ricarkol@google.com
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/aarch64/page_fault_test.c [new file with mode: 0644]
tools/testing/selftests/kvm/include/aarch64/processor.h