aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2021-12-09 13:54:36 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-09 09:07:39 -0500
commit8e819d75cbcf541a833219521379114a76a645a6 (patch)
tree0a393f8483640026ffa1edcc968e7c3ce4e9579f /arch/x86/kvm/trace.h
parentKVM: nVMX: Implement Enlightened MSR Bitmap feature (diff)
downloadlinux-dev-8e819d75cbcf541a833219521379114a76a645a6.tar.xz
linux-dev-8e819d75cbcf541a833219521379114a76a645a6.zip
KVM: x86: add a tracepoint for APICv/AVIC interrupt delivery
This allows to see how many interrupts were delivered via the APICv/AVIC from the host. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20211209115440.394441-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r--arch/x86/kvm/trace.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h
index 953b0fcb21ee..92e6f6702f00 100644
--- a/arch/x86/kvm/trace.h
+++ b/arch/x86/kvm/trace.h
@@ -1356,6 +1356,30 @@ TRACE_EVENT(kvm_apicv_update_request,
__entry->bit)
);
+TRACE_EVENT(kvm_apicv_accept_irq,
+ TP_PROTO(__u32 apicid, __u16 dm, __u16 tm, __u8 vec),
+ TP_ARGS(apicid, dm, tm, vec),
+
+ TP_STRUCT__entry(
+ __field( __u32, apicid )
+ __field( __u16, dm )
+ __field( __u16, tm )
+ __field( __u8, vec )
+ ),
+
+ TP_fast_assign(
+ __entry->apicid = apicid;
+ __entry->dm = dm;
+ __entry->tm = tm;
+ __entry->vec = vec;
+ ),
+
+ TP_printk("apicid %x vec %u (%s|%s)",
+ __entry->apicid, __entry->vec,
+ __print_symbolic((__entry->dm >> 8 & 0x7), kvm_deliver_mode),
+ __entry->tm ? "level" : "edge")
+);
+
/*
* Tracepoint for AMD AVIC
*/