diff options
author | Aaron Lewis <aaronlewis@google.com> | 2023-03-07 14:13:56 +0000 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-04-07 09:24:16 -0700 |
commit | dfdeda67ea2dac57d2d7506d65cfe5a0878ad285 (patch) | |
tree | cf88035aea3e9860e1cca9e3d500c345776e7185 /arch/ia64/Kconfig | |
parent | 4fa5843d81fdce9ba7e03f8a666e2f8e592aec2b (diff) | |
download | linux-dfdeda67ea2dac57d2d7506d65cfe5a0878ad285.tar.gz linux-dfdeda67ea2dac57d2d7506d65cfe5a0878ad285.tar.bz2 linux-dfdeda67ea2dac57d2d7506d65cfe5a0878ad285.zip |
KVM: x86/pmu: Prevent the PMU from counting disallowed events
When counting "Instructions Retired" (0xc0) in a guest, KVM will
occasionally increment the PMU counter regardless of if that event is
being filtered. This is because some PMU events are incremented via
kvm_pmu_trigger_event(), which doesn't know about the event filter. Add
the event filter to kvm_pmu_trigger_event(), so events that are
disallowed do not increment their counters.
Fixes: 9cd803d496e7 ("KVM: x86: Update vPMCs when retiring instructions")
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Reviewed-by: Like Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20230307141400.1486314-2-aaronlewis@google.com
[sean: prepend "pmc" to the new function]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/ia64/Kconfig')
0 files changed, 0 insertions, 0 deletions