mirror_ubuntu-kernels/tools/testing/selftests/kvm/lib
David Matlack e0f3f46e42 KVM: selftests: Restrict test region to 48-bit physical addresses when using nested
The selftests nested code only supports 4-level paging at the moment.
This means it cannot map nested guest physical addresses with more than
48 bits. Allow perf_test_util nested mode to work on hosts with more
than 48 physical addresses by restricting the guest test region to
48-bits.

While here, opportunistically fix an off-by-one error when dealing with
vm_get_max_gfn(). perf_test_util.c was treating this as the maximum
number of GFNs, rather than the maximum allowed GFN. This didn't result
in any correctness issues, but it did end up shifting the test region
down slightly when using huge pages.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220520233249.3776001-12-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-09 10:52:27 -04:00
..
aarch64 selftests: KVM: Create helper for making SMCCC calls 2022-05-03 21:30:20 +01:00
riscv KVM: selftests: riscv: Remove unneeded semicolon 2022-05-20 09:08:58 +05:30
s390x KVM: selftests: Add wrapper to allocate page table page 2021-06-24 11:47:49 -04:00
x86_64 KVM: selftests: Add option to run dirty_log_perf_test vCPUs in L2 2022-06-09 10:52:27 -04:00
assert.c KVM: selftests: Print the errno besides error-string in TEST_ASSERT 2021-04-20 04:18:52 -04:00
elf.c KVM: selftests: Expose align() helpers to tests 2021-11-16 07:43:24 -05:00
guest_modes.c KVM/riscv changes for 5.17, take #1 2022-01-07 10:43:02 -05:00
io.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
kvm_util_internal.h KVM: selftests: create alias mappings when using shared memory 2021-05-27 07:45:56 -04:00
kvm_util.c KVM: selftests: Split out helper to allocate guest mem via memfd 2022-03-08 10:59:10 -05:00
perf_test_util.c KVM: selftests: Restrict test region to 48-bit physical addresses when using nested 2022-06-09 10:52:27 -04:00
rbtree.c KVM: selftests: Keep track of memslots more efficiently 2021-05-27 07:45:54 -04:00
sparsebit.c kvm: selftests: Fix spelling mistake "missmatch" -> "mismatch" 2021-09-30 04:27:08 -04:00
test_util.c KVM: selftests: Assert mmap HVA is aligned when using HugeTLB 2021-11-16 07:43:25 -05:00