diff options
author | Like Xu <likexu@tencent.com> | 2022-08-31 16:53:23 +0800 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2022-09-28 12:47:21 -0700 |
commit | f331601c65ad217a5c000ce20c26266d3f0aceb3 (patch) | |
tree | e2ebab53a1d08485298bbfc92e3fd6ca725dec1b /arch/mips/fw/lib/cmdline.c | |
parent | c23981df6642eec1da94a8125ec0ec402f7b1b7b (diff) |
KVM: x86/pmu: Don't generate PEBS records for emulated instructions
KVM will accumulate an enabled counter for at least INSTRUCTIONS or
BRANCH_INSTRUCTION hw event from any KVM emulated instructions,
generating emulated overflow interrupt on counter overflow, which
in theory should also happen when the PEBS counter overflows but
it currently lacks this part of the underlying support (e.g. through
software injection of records in the irq context or a lazy approach).
In this case, KVM skips the injection of this BUFFER_OVF PMI (effectively
dropping one PEBS record) and let the overflow counter move on. The loss
of a single sample does not introduce a loss of accuracy, but is easily
noticeable for certain specific instructions.
This issue is expected to be addressed along with the issue
of PEBS cross-mapped counters with a slow-path proposal.
Fixes: 79f3e3b58386 ("KVM: x86/pmu: Reprogram PEBS event to emulate guest PEBS counter")
Signed-off-by: Like Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20220831085328.45489-3-likexu@tencent.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/mips/fw/lib/cmdline.c')
0 files changed, 0 insertions, 0 deletions