]> git.itanic.dy.fi Git - linux-stable/commit
KVM: selftests: Make hyperv_clock require TSC based system clocksource
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 9 Jan 2024 14:11:20 +0000 (15:11 +0100)
committerSean Christopherson <seanjc@google.com>
Thu, 1 Feb 2024 16:58:15 +0000 (08:58 -0800)
commitb6831a108be1206cd9f0e7905b48677b4147d5f9
treeec5a132fb8d2612e8a2e6f97333d9763ec10049a
parent09951bf2cbb3a7893f76d1364b0ae6e3007ff1de
KVM: selftests: Make hyperv_clock require TSC based system clocksource

KVM sets up Hyper-V TSC page clocksource for its guests when system
clocksource is 'based on TSC' (see gtod_is_based_on_tsc()), running
hyperv_clock with any other clocksource leads to imminent failure.

Add the missing requirement to make the test skip gracefully.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20240109141121.1619463-5-vkuznets@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/hyperv_clock.c