diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-09-30 10:36:27 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-30 14:23:46 -0700 |
| commit | 43f58b1ee6fe030d0e425cab0382d1e07841f897 (patch) | |
| tree | d733c3f57ee1702f699b82eec235a49189a9c975 /tools/perf/scripts/python/flamegraph.py | |
| parent | faa4f010187c5d4cc4ddb3adecb9943ff87472f5 (diff) | |
KVM: selftests: Use KVM's reported TSC KHz as L0's frequency (sanity checked)
Use KVM's reported default TSC frequency as L0's frequency instead of
calibrating L0's frequency using RDTSC. Trying to calibrate the frequency
in userspace is all but guaranteed to be wildly inaccurate, e.g. due to
interrupts, preemption, etc, and no known CPU supports TSC scaling without
also having a constant TSC. I.e. there's no need to calibrate the current
frequency, as it should also be the same as KVM's default frequency.
Opportunistically sanity check KVM's reported frequency against what is
observed via RDTSC, e.g. so that KVM_GET_TSC_KHZ or platform issues show up
much earlier in the test, before VMs get involved.
Link: https://patch.msgid.link/20260930173635.3362655-14-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
