summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-12-05 16:17:10 -0800
committerSean Christopherson <seanjc@google.com>2026-01-08 11:52:16 -0800
commitb0b6a8d3be16ea742bf835407e9968378c0c753c (patch)
tree45f512977534f7fbed5d97aeb840535fc4335c8a /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parent860bcb1021f5234820592853d56ca12f69e9c81f (diff)
KVM: x86/pmu: Elide WRMSRs when loading guest PMCs if values already match
When loading a mediated PMU state, elide the WRMSRs to load PMCs with the guest's value if the value in hardware already matches the guest's value. For the relatively common case where neither the guest nor the host is actively using the PMU, i.e. when all/many counters are '0', eliding the WRMSRs reduces the latency of handling VM-Exit by a measurable amount (WRMSR is significantly more expensive than RDPMC). As measured by KVM-Unit-Tests' CPUID VM-Exit testcase, this provides a a ~25% reduction in latency (4k => 3k cycles) on Intel Emerald Rapids, and a ~13% reduction (6.2k => 5.3k cycles) on AMD Turin. Cc: Manali Shukla <manali.shukla@amd.com> Tested-by: Xudong Hao <xudong.hao@intel.com> Tested-by: Manali Shukla <manali.shukla@amd.com> Link: https://patch.msgid.link/20251206001720.468579-35-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions