Skip to content

Commit f5714bb

Browse files
vittyvkbonzini
authored andcommitted
KVM: x86: Introduce trace_kvm_hv_hypercall_done()
Hypercall failures are unusual with potentially far going consequences so it would be useful to see their results when tracing. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Siddharth Chandrasekaran <sidcha@amazon.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210730122625.112848-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 2e2f1e8 commit f5714bb

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

arch/x86/kvm/hyperv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,6 +2016,7 @@ static void kvm_hv_hypercall_set_result(struct kvm_vcpu *vcpu, u64 result)
20162016

20172017
static int kvm_hv_hypercall_complete(struct kvm_vcpu *vcpu, u64 result)
20182018
{
2019+
trace_kvm_hv_hypercall_done(result);
20192020
kvm_hv_hypercall_set_result(vcpu, result);
20202021
++vcpu->stat.hypercalls;
20212022
return kvm_skip_emulated_instruction(vcpu);

arch/x86/kvm/trace.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ TRACE_EVENT(kvm_hv_hypercall,
9292
__entry->outgpa)
9393
);
9494

95+
TRACE_EVENT(kvm_hv_hypercall_done,
96+
TP_PROTO(u64 result),
97+
TP_ARGS(result),
98+
99+
TP_STRUCT__entry(
100+
__field(__u64, result)
101+
),
102+
103+
TP_fast_assign(
104+
__entry->result = result;
105+
),
106+
107+
TP_printk("result 0x%llx", __entry->result)
108+
);
109+
95110
/*
96111
* Tracepoint for Xen hypercall.
97112
*/

0 commit comments

Comments
 (0)