]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: selftests: introduce and use more page size-related constants
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Apr 2022 10:27:27 +0000 (06:27 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Apr 2022 19:41:01 +0000 (15:41 -0400)
commit6b550732a77a5343d11b258de0a6d0b7dc23994d
treeffb5b859c5e3bf47da256c9f60ad268474b3f717
parent6c315fe994043a970884b12d0313399deaa5a109
kvm: selftests: introduce and use more page size-related constants

Clean up code that was hardcoding masks for various fields,
now that the masks are included in processor.h.

For more cleanup, define PAGE_SIZE and PAGE_MASK just like in Linux.
PAGE_SIZE in particular was defined by several tests.

Suggested-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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/amx_test.c
tools/testing/selftests/kvm/x86_64/emulator_error_test.c
tools/testing/selftests/kvm/x86_64/smm_test.c
tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c