diff options
author | Like Xu <like.xu@linux.intel.com> | 2020-05-29 10:43:45 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-06-01 11:26:09 +0300 |
commit | 27461da31089ace6966e4f1695cba7eb87ffbe4f (patch) | |
tree | 1f638cd94d2d9d5f393dfb9cbdb3c943e383a97d /Documentation/virt | |
parent | cbd717585b8038d93c309176bb563a5c6de60ac7 (diff) | |
download | linux-27461da31089ace6966e4f1695cba7eb87ffbe4f.tar.xz |
KVM: x86/pmu: Support full width counting
Intel CPUs have a new alternative MSR range (starting from MSR_IA32_PMC0)
for GP counters that allows writing the full counter width. Enable this
range from a new capability bit (IA32_PERF_CAPABILITIES.FW_WRITE[bit 13]).
The guest would query CPUID to get the counter width, and sign extends
the counter values as needed. The traditional MSRs always limit to 32bit,
even though the counter internally is larger (48 or 57 bits).
When the new capability is set, use the alternative range which do not
have these restrictions. This lowers the overhead of perf stat slightly
because it has to do less interrupts to accumulate the counter value.
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Message-Id: <20200529074347.124619-3-like.xu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/virt')
0 files changed, 0 insertions, 0 deletions