This patch adds a field in arm64 arch vcpu structure to save the last exit reason, which could be poked by the hook provided by the tracepoint. A previous solution adding vcpu exits stats was discussed here: https://lore.kernel.org/all/20210922010851.2312845-3-jingzhangos@xxxxxxxxxx. As Marc suggested, a tracepoint is preferred for those heavy arm64 vcpu exit reason stats. Jing Zhang (2): KVM: arm64: Add arch specific exit reasons KVM: arm64: Add debug tracepoint for vcpu exits arch/arm64/include/asm/kvm_emulate.h | 5 +++ arch/arm64/include/asm/kvm_host.h | 36 ++++++++++++++++ arch/arm64/kvm/arm.c | 2 + arch/arm64/kvm/handle_exit.c | 62 +++++++++++++++++++++++++--- arch/arm64/kvm/mmu.c | 4 ++ arch/arm64/kvm/sys_regs.c | 6 +++ arch/arm64/kvm/trace_arm.h | 8 ++++ 7 files changed, 118 insertions(+), 5 deletions(-) base-commit: 9872e6bc08d6ef6de79717ff6bbff0f297c134ef -- 2.35.1.723.g4982287a31-goog