OSDN Git Service

KVM: selftests: Drop helpers to read/write page table entries
authorSean Christopherson <seanjc@google.com>
Thu, 6 Oct 2022 00:45:06 +0000 (00:45 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 17 Nov 2022 00:58:54 +0000 (16:58 -0800)
commit816c54b74742ac1a74a74de9355ab982d11e63e6
treeebdc737fea2b997eaa17af564ebf4aa3b9678132
parent9a6418dacd241169df9e0eeefc7980b3f9b40794
KVM: selftests: Drop helpers to read/write page table entries

Drop vm_{g,s}et_page_table_entry() and instead expose the "inner"
helper (was _vm_get_page_table_entry()) that returns a _pointer_ to the
PTE, i.e. let tests directly modify PTEs instead of bouncing through
helpers that just make life difficult.

Opportunsitically use BIT_ULL() in emulator_error_test, and use the
MAXPHYADDR define to set the "rogue" GPA bit instead of open coding the
same value.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20221006004512.666529-2-seanjc@google.com
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/emulator_error_test.c