diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2018-12-04 13:44:22 +0300 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2018-12-19 20:47:08 +0300 |
commit | 599d79dcd18fa0f88ae15b7042c9d6b011a678b2 (patch) | |
tree | c032a33528d627b77c1c170679f7f9a73b89ac58 /arch/arm64/kvm/sys_regs.h | |
parent | da6f16662a6eba3de0d1a39f3b8913d38754bb2b (diff) | |
download | linux-599d79dcd18fa0f88ae15b7042c9d6b011a678b2.tar.xz |
arm64: KVM: Add trapped system register access tracepoint
We're pretty blind when it comes to system register tracing,
and rely on the ESR value displayed by kvm_handle_sys, which
isn't much.
Instead, let's add an actual name to the sysreg entries, so that
we can finally print it as we're about to perform the access
itself.
The new tracepoint is conveniently called kvm_sys_access.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/sys_regs.h')
-rw-r--r-- | arch/arm64/kvm/sys_regs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h index cd710f8b63e0..3b1bc7f01d0b 100644 --- a/arch/arm64/kvm/sys_regs.h +++ b/arch/arm64/kvm/sys_regs.h @@ -35,6 +35,9 @@ struct sys_reg_params { }; struct sys_reg_desc { + /* Sysreg string for debug */ + const char *name; + /* MRS/MSR instruction which accesses it. */ u8 Op0; u8 Op1; @@ -130,6 +133,7 @@ const struct sys_reg_desc *find_reg_by_id(u64 id, #define Op2(_x) .Op2 = _x #define SYS_DESC(reg) \ + .name = #reg, \ Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \ CRn(sys_reg_CRn(reg)), CRm(sys_reg_CRm(reg)), \ Op2(sys_reg_Op2(reg)) |