KVM: selftests: aarch64: Do not default to dirty PTE pages on all S1PTWs
authorRicardo Koller <ricarkol@google.com>
Fri, 27 Jan 2023 21:43:51 +0000 (21:43 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 29 Jan 2023 18:49:08 +0000 (18:49 +0000)
commit42561751ea918d8f3f54412622735e1f887cb360
tree3bc27353bb9db41265e99ca950dd5ba1e1c53d11
parent0dd8d22a887a473f6f11abf556c4f7944ab5ef1d
KVM: selftests: aarch64: Do not default to dirty PTE pages on all S1PTWs

Only Stage1 Page table walks (S1PTW) trying to write into a PTE should
result in the PTE page being dirty in the log.  However, the dirty log
tests in page_fault_test default to treat all S1PTW accesses as writes.
Fix the relevant tests by asserting dirty pages only for S1PTW writes,
which in these tests only applies to when Hardware management of the Access
Flag is enabled.

Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230127214353.245671-3-ricarkol@google.com
tools/testing/selftests/kvm/aarch64/page_fault_test.c