1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/kvm/lib/x86_64
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
..
apic.c KVM: selftests: Remove obsolete and incorrect test case metadata 2023-10-04 12:53:05 -07:00
handlers.S selftests: kvm: remove reassignment of non-absolute variables 2021-05-07 06:06:13 -04:00
hyperv.c KVM: selftests: Allocate Hyper-V partition assist page 2022-11-21 06:41:59 -05:00
memstress.c KVM: selftests: Assert in prepare_eptp() that nEPT is supported 2022-11-16 16:59:07 -08:00
pmu.c KVM: selftests: Add pmu.h and lib/pmu.c for common PMU assets 2024-01-30 15:29:18 -08:00
processor.c KVM: selftests: x86: Prioritize getting max_gfn from GuestPhysBits 2024-06-05 06:16:10 -07:00
sev.c KVM: selftests: Define _GNU_SOURCE for all selftests code 2024-04-29 12:49:10 -07:00
svm.c Revert "KVM: selftests: Fix nested SVM tests when built with clang" 2022-09-30 06:39:34 -04:00
ucall.c KVM: selftests: Add arch ucall.h and inline simple arch hooks 2023-08-02 14:42:52 -07:00
vmx.c KVM: selftests: x86_64: Remove redundant newlines 2024-01-30 12:31:56 -08:00