~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/riscv/kvm/trace.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 /*
  3  * Tracepoints for RISC-V KVM
  4  *
  5  * Copyright 2024 Beijing ESWIN Computing Technology Co., Ltd.
  6  *
  7  */
  8 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
  9 #define _TRACE_KVM_H
 10 
 11 #include <linux/tracepoint.h>
 12 
 13 #undef TRACE_SYSTEM
 14 #define TRACE_SYSTEM kvm
 15 
 16 TRACE_EVENT(kvm_entry,
 17         TP_PROTO(struct kvm_vcpu *vcpu),
 18         TP_ARGS(vcpu),
 19 
 20         TP_STRUCT__entry(
 21                 __field(unsigned long, pc)
 22         ),
 23 
 24         TP_fast_assign(
 25                 __entry->pc     = vcpu->arch.guest_context.sepc;
 26         ),
 27 
 28         TP_printk("PC: 0x016%lx", __entry->pc)
 29 );
 30 
 31 TRACE_EVENT(kvm_exit,
 32         TP_PROTO(struct kvm_cpu_trap *trap),
 33         TP_ARGS(trap),
 34 
 35         TP_STRUCT__entry(
 36                 __field(unsigned long, sepc)
 37                 __field(unsigned long, scause)
 38                 __field(unsigned long, stval)
 39                 __field(unsigned long, htval)
 40                 __field(unsigned long, htinst)
 41         ),
 42 
 43         TP_fast_assign(
 44                 __entry->sepc           = trap->sepc;
 45                 __entry->scause         = trap->scause;
 46                 __entry->stval          = trap->stval;
 47                 __entry->htval          = trap->htval;
 48                 __entry->htinst         = trap->htinst;
 49         ),
 50 
 51         TP_printk("SEPC:0x%lx, SCAUSE:0x%lx, STVAL:0x%lx, HTVAL:0x%lx, HTINST:0x%lx",
 52                 __entry->sepc,
 53                 __entry->scause,
 54                 __entry->stval,
 55                 __entry->htval,
 56                 __entry->htinst)
 57 );
 58 
 59 #endif /* _TRACE_RSICV_KVM_H */
 60 
 61 #undef TRACE_INCLUDE_PATH
 62 #define TRACE_INCLUDE_PATH .
 63 #undef TRACE_INCLUDE_FILE
 64 #define TRACE_INCLUDE_FILE trace
 65 
 66 /* This part must be outside protection */
 67 #include <trace/define_trace.h>
 68 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php