1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/kvm/include
Tao Su 980b8bc019 KVM: selftests: x86: Prioritize getting max_gfn from GuestPhysBits
Use the max mappable GPA via GuestPhysBits advertised by KVM to calculate
max_gfn. Currently some selftests (e.g. access_tracking_perf_test,
dirty_log_test...) add RAM regions close to max_gfn, so guest may access
GPA beyond its mappable range and cause infinite loop.

Adjust max_gfn in vm_compute_max_gfn() since x86 selftests already
overrides vm_compute_max_gfn() specifically to deal with goofy edge cases.

Reported-by: Yi Lai <yi1.lai@intel.com>
Signed-off-by: Tao Su <tao1.su@linux.intel.com>
Tested-by: Yi Lai <yi1.lai@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20240513014003.104593-1-tao1.su@linux.intel.com
[sean: tweak name, add comment and sanity check]
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-06-05 06:16:10 -07:00
..
aarch64 KVM selftests treewide updates for 6.10: 2024-05-12 03:18:11 -04:00
riscv KVM: riscv: selftests: Add a test for PMU snapshot functionality 2024-04-26 13:14:10 +05:30
s390x Revert "kvm: selftests: move base kvm_util.h declarations to kvm_util_base.h" 2024-04-29 12:54:13 -07:00
x86_64 KVM: selftests: x86: Prioritize getting max_gfn from GuestPhysBits 2024-06-05 06:16:10 -07:00
guest_modes.h KVM: selftests: arm64: Determine max ipa size per-page size 2023-11-27 15:03:50 +00:00
kvm_test_harness.h KVM: selftests: Add a macro to define a test with one vcpu 2024-02-28 20:58:12 +00:00
kvm_util.h KVM: selftests: Move GDT, IDT, and TSS fields to x86's kvm_vm_arch 2024-04-29 12:55:07 -07:00
kvm_util_types.h KVM: sefltests: Add kvm_util_types.h to hold common types, e.g. vm_vaddr_t 2024-04-29 12:54:16 -07:00
memstress.h KVM: selftests: Provide a global pseudo-RNG instance for all tests 2024-04-29 12:50:41 -07:00
numaif.h KVM: selftests: Add missing header file needed by xAPIC IPI tests 2021-02-11 08:02:08 -05:00
sparsebit.h KVM: selftests: Add a macro to iterate over a sparsebit range 2024-02-28 20:58:12 +00:00
test_util.h KVM: selftests: Provide an API for getting a random bool from an RNG 2024-04-29 12:50:42 -07:00
timer_test.h KVM: riscv: selftests: Add sstc timer test 2024-03-06 20:53:29 +05:30
ucall_common.h KVM: selftests: Annotate guest ucall, printf, and assert helpers with __printf() 2023-12-01 08:15:41 -08:00
userfaultfd_util.h KVM selftests treewide updates for 6.10: 2024-05-12 03:18:11 -04:00