1 #ifndef XEN_X86_PV_TRACE_H
2 #define XEN_X86_PV_TRACE_H
3
4 #include <xen/trace.h>
5
6 #include <asm/page.h>
7
8 void __trace_pv_trap(int trapnr, unsigned long eip,
9 int use_error_code, unsigned error_code);
trace_pv_trap(int trapnr,unsigned long eip,int use_error_code,unsigned error_code)10 static inline void trace_pv_trap(int trapnr, unsigned long eip,
11 int use_error_code, unsigned error_code)
12 {
13 if ( unlikely(tb_init_done) )
14 __trace_pv_trap(trapnr, eip, use_error_code, error_code);
15 }
16
17 void __trace_pv_page_fault(unsigned long addr, unsigned error_code);
trace_pv_page_fault(unsigned long addr,unsigned error_code)18 static inline void trace_pv_page_fault(unsigned long addr,
19 unsigned error_code)
20 {
21 if ( unlikely(tb_init_done) )
22 __trace_pv_page_fault(addr, error_code);
23 }
24
25 void __trace_trap_one_addr(unsigned event, unsigned long va);
trace_trap_one_addr(unsigned event,unsigned long va)26 static inline void trace_trap_one_addr(unsigned event, unsigned long va)
27 {
28 if ( unlikely(tb_init_done) )
29 __trace_trap_one_addr(event, va);
30 }
31
32 void __trace_trap_two_addr(unsigned event, unsigned long va1,
33 unsigned long va2);
trace_trap_two_addr(unsigned event,unsigned long va1,unsigned long va2)34 static inline void trace_trap_two_addr(unsigned event, unsigned long va1,
35 unsigned long va2)
36 {
37 if ( unlikely(tb_init_done) )
38 __trace_trap_two_addr(event, va1, va2);
39 }
40
41 void __trace_ptwr_emulation(unsigned long addr, l1_pgentry_t npte);
trace_ptwr_emulation(unsigned long addr,l1_pgentry_t npte)42 static inline void trace_ptwr_emulation(unsigned long addr, l1_pgentry_t npte)
43 {
44 if ( unlikely(tb_init_done) )
45 __trace_ptwr_emulation(addr, npte);
46 }
47
48 #endif /* XEN_X86_PV_TRACE_H */
49