diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2022-06-01 16:43:22 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-07 11:28:50 -0400 |
commit | eae260be3a0111a28fe95923e117a55dddec0384 (patch) | |
tree | 3e529bd5b529778bca2cffb7b0b7e6f8b07eccac /tools/perf/builtin-daemon.c | |
parent | 5ba7c4c6d1c7af47a916f728bb5940669684a087 (diff) |
KVM: selftests: Make hyperv_clock selftest more stable
hyperv_clock doesn't always give a stable test result, especially with
AMD CPUs. The test compares Hyper-V MSR clocksource (acquired either
with rdmsr() from within the guest or KVM_GET_MSRS from the host)
against rdtsc(). To increase the accuracy, increase the measured delay
(done with nop loop) by two orders of magnitude and take the mean rdtsc()
value before and after rdmsr()/KVM_GET_MSRS.
Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20220601144322.1968742-1-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/builtin-daemon.c')
0 files changed, 0 insertions, 0 deletions