summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/x86_64
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2024-01-09 17:11:19 +0300
committerSean Christopherson <seanjc@google.com>2024-02-01 19:58:14 +0300
commit09951bf2cbb3a7893f76d1364b0ae6e3007ff1de (patch)
tree019184eb1ef6084978e7981fe709ba5ed6b69d43 /tools/testing/selftests/kvm/include/x86_64
parent410cb01ead5bcec500c0654f361d620553f930aa (diff)
downloadlinux-09951bf2cbb3a7893f76d1364b0ae6e3007ff1de.tar.xz
KVM: selftests: Run clocksource dependent tests with hyperv_clocksource_tsc_page too
KVM's 'gtod_is_based_on_tsc()' recognizes two clocksources: 'tsc' and 'hyperv_clocksource_tsc_page' and enables kvmclock in 'masterclock' mode when either is in use. Transform 'sys_clocksource_is_tsc()' into 'sys_clocksource_is_based_on_tsc()' to support the later. This affects two tests: kvm_clock_test and vmx_nested_tsc_scaling_test, both seem to work well when system clocksource is 'hyperv_clocksource_tsc_page'. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Link: https://lore.kernel.org/r/20240109141121.1619463-4-vkuznets@redhat.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include/x86_64')
-rw-r--r--tools/testing/selftests/kvm/include/x86_64/processor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
index 01eec72e0d3e..5bca8c947c82 100644
--- a/tools/testing/selftests/kvm/include/x86_64/processor.h
+++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
@@ -1271,6 +1271,6 @@ void virt_map_level(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr,
#define PFERR_GUEST_PAGE_MASK BIT_ULL(PFERR_GUEST_PAGE_BIT)
#define PFERR_IMPLICIT_ACCESS BIT_ULL(PFERR_IMPLICIT_ACCESS_BIT)
-bool sys_clocksource_is_tsc(void);
+bool sys_clocksource_is_based_on_tsc(void);
#endif /* SELFTEST_KVM_PROCESSOR_H */