Skip to content

Commit c3f3719

Browse files
dwmw2bonzini
authored andcommitted
KVM: x86/xen: Add CPL to Xen hypercall tracepoint
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 3ca9d84 commit c3f3719

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

arch/x86/kvm/trace.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,13 @@ TRACE_EVENT(kvm_hv_hypercall_done,
113113
* Tracepoint for Xen hypercall.
114114
*/
115115
TRACE_EVENT(kvm_xen_hypercall,
116-
TP_PROTO(unsigned long nr, unsigned long a0, unsigned long a1,
117-
unsigned long a2, unsigned long a3, unsigned long a4,
118-
unsigned long a5),
119-
TP_ARGS(nr, a0, a1, a2, a3, a4, a5),
116+
TP_PROTO(u8 cpl, unsigned long nr,
117+
unsigned long a0, unsigned long a1, unsigned long a2,
118+
unsigned long a3, unsigned long a4, unsigned long a5),
119+
TP_ARGS(cpl, nr, a0, a1, a2, a3, a4, a5),
120120

121121
TP_STRUCT__entry(
122+
__field(u8, cpl)
122123
__field(unsigned long, nr)
123124
__field(unsigned long, a0)
124125
__field(unsigned long, a1)
@@ -129,6 +130,7 @@ TRACE_EVENT(kvm_xen_hypercall,
129130
),
130131

131132
TP_fast_assign(
133+
__entry->cpl = cpl;
132134
__entry->nr = nr;
133135
__entry->a0 = a0;
134136
__entry->a1 = a1;
@@ -138,8 +140,9 @@ TRACE_EVENT(kvm_xen_hypercall,
138140
__entry->a4 = a5;
139141
),
140142

141-
TP_printk("nr 0x%lx a0 0x%lx a1 0x%lx a2 0x%lx a3 0x%lx a4 0x%lx a5 %lx",
142-
__entry->nr, __entry->a0, __entry->a1, __entry->a2,
143+
TP_printk("cpl %d nr 0x%lx a0 0x%lx a1 0x%lx a2 0x%lx a3 0x%lx a4 0x%lx a5 %lx",
144+
__entry->cpl, __entry->nr,
145+
__entry->a0, __entry->a1, __entry->a2,
143146
__entry->a3, __entry->a4, __entry->a5)
144147
);
145148

arch/x86/kvm/xen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ int kvm_xen_hypercall(struct kvm_vcpu *vcpu)
12561256
}
12571257
#endif
12581258
cpl = static_call(kvm_x86_get_cpl)(vcpu);
1259-
trace_kvm_xen_hypercall(input, params[0], params[1], params[2],
1259+
trace_kvm_xen_hypercall(cpl, input, params[0], params[1], params[2],
12601260
params[3], params[4], params[5]);
12611261

12621262
/*

0 commit comments

Comments
 (0)