[PATCH] RISC-V: KVM: Add arch-specific tracepoints
Anup Patel
anup at brainfault.org
Tue Jul 28 08:35:39 PDT 2026
On Fri, Jun 26, 2026 at 4:07 PM Yuhang.chen <yhchen312 at gmail.com> wrote:
>
> Add RISC-V KVM tracepoints for events that are useful when debugging
> guest exits and in-kernel emulation paths. The existing kvm_entry and
> kvm_exit tracepoints are kept, with the kvm_entry PC format fixed to use
> zero-padded hexadecimal output.
>
> The newly added tracepoints cover:
>
> * kvm_guest_fault for G-stage page faults
> * kvm_irq_line for userspace IRQ injection
> * kvm_mmio_emulate for MMIO load/store emulation
> * kvm_timer_update_irq for VS timer interrupt updates
> * kvm_wait_riscv for trapped WFI/WRS instructions
> * kvm_sbi_ecall for SBI ecalls
> * kvm_csr_access for CSR emulation
Drop kvm_guest_fault, kvm_sbi_ecall, kvm_wait_riscv, and
kvm_csr_access tracepoints. Instead add common
kvm_vcpu_exit tracepoint for all vcpu exits just before the
switch case in kvm_riscv_vcpu_exit() function.
Drop the kvm_irq_line and kvm_timer_update_irq tracepoints.
Instead add common kvm_vcpu_irq tracepoint called from
kvm_riscv_vcpu_set/unset_interrupt() function.
The kvm_mmio_emulate tracepoint is fine.
Regards,
Anup
More information about the linux-riscv
mailing list