diff options
| author | Mingwei Zhang <[email protected]> | 2024-01-23 22:12:20 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2024-02-02 22:07:27 +0000 |
| commit | 05519c86d6997cfb9bb6c82ce1595d1015b718dc (patch) | |
| tree | 0f72bb68d3bf88055d35843a8276e35a8d419c1b /tools/perf/scripts/python/libxed.py | |
| parent | KVM: x86: make KVM_REQ_NMI request iff NMI pending for vcpu (diff) | |
| download | kernel-05519c86d6997cfb9bb6c82ce1595d1015b718dc.tar.gz kernel-05519c86d6997cfb9bb6c82ce1595d1015b718dc.zip | |
KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl
Use a u64 instead of a u8 when taking a snapshot of pmu->fixed_ctr_ctrl
when reprogramming fixed counters, as truncating the value results in KVM
thinking fixed counter 2 is already disabled (the bug also affects fixed
counters 3+, but KVM doesn't yet support those). As a result, if the
guest disables fixed counter 2, KVM will get a false negative and fail to
reprogram/disable emulation of the counter, which can leads to incorrect
counts and spurious PMIs in the guest.
Fixes: 76d287b2342e ("KVM: x86/pmu: Drop "u8 ctrl, int idx" for reprogram_fixed_counter()")
Cc: [email protected]
Signed-off-by: Mingwei Zhang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[sean: rewrite changelog to call out the effects of the bug]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions
