Sean Christopherson f19063b1ca KVM: x86/pmu: Snapshot event selectors that KVM emulates in software
Snapshot the event selectors for the events that KVM emulates in software,
which is currently instructions retired and branch instructions retired.
The event selectors a tied to the underlying CPU, i.e. are constant for a
given platform even though perf doesn't manage the mappings as such.

Getting the event selectors from perf isn't exactly cheap, especially if
mitigations are enabled, as at least one indirect call is involved.

Snapshot the values in KVM instead of optimizing perf as working with the
raw event selectors will be required if KVM ever wants to emulate events
that aren't part of perf's uABI, i.e. that don't have an "enum perf_hw_id"
entry.

Link: https://lore.kernel.org/r/20231110022857.1273836-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-02-01 09:35:48 -08:00
..
2024-01-18 17:25:39 -08:00
2024-01-18 15:16:57 -08:00
2024-01-25 18:23:10 +01:00
2024-01-25 18:23:10 +01:00
2024-01-19 09:10:23 -08:00
2024-01-10 18:13:44 -08:00
2024-01-18 15:01:28 -08:00
2024-01-17 11:27:23 -08:00
2024-01-18 15:01:28 -08:00
2023-09-05 10:09:31 -07:00
2024-01-18 15:01:28 -08:00
2024-01-21 11:04:29 -08:00
2024-01-26 13:09:38 -08:00
2024-01-19 09:10:23 -08:00
2024-01-20 09:24:06 -08:00
2024-01-19 08:08:53 -06:00
2024-01-18 11:37:24 -08:00
2024-01-18 15:01:28 -08:00
2024-01-18 15:16:57 -08:00