[PW_SID:1121386] perf kvm/riscv: Fix event key collision between interrupts and exceptions#2211
[PW_SID:1121386] perf kvm/riscv: Fix event key collision between interrupts and exceptions#2211linux-riscv-bot wants to merge 2 commits into
Conversation
…ions RISC-V scause encodes interrupts and exceptions in the same cause field, with bit 63 on RV64 and bit 31 on RV32 used to distinguish interrupts from exceptions. The lower cause bits overlap between the two namespaces, so masking off the interrupt bit makes distinct IRQ and exception events map to the same key. This affects perf kvm stat exit-reason decoding. For example, IRQ_S_TIMER and EXC_LOAD_ACCESS both use cause code 5, and can be misreported as the wrong exit reason. Fix this by using the full scause value as the lookup key in event_get_key(). Also split TRAP() into TRAP_EXC() and TRAP_IRQ() so interrupt entries are encoded with the architecture-specific IRQ bit set, matching the value reported by hardware. Fixes: ceea279 ("perf kvm stat: Remove use of the arch directory") Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
|
Patch 1: "perf kvm/riscv: Fix event key collision between interrupts and exceptions" |
a50938c to
40ba5ca
Compare
PR for series 1121386 applied to workflow__riscv__fixes
Name: perf kvm/riscv: Fix event key collision between interrupts and exceptions
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1121386
Version: 1