KVM: x86: Add interrupt injection information to the kvm_entry tracepoint
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 10 Sep 2024 20:03:48 +0000 (16:03 -0400)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 23:14:48 +0000 (15:14 -0800)
commit3e633e7e7d0725b483aee843cbdce22bc9cd1707
tree902c5db4696f2722ede64ed0e9879f8f949a2b24
parent62e41f6b4f3697e5909cdf70d56e9a7ebd958732
KVM: x86: Add interrupt injection information to the kvm_entry tracepoint

Add VMX/SVM specific interrupt injection info the kvm_entry tracepoint.
As is done with kvm_exit, gather the information via a kvm_x86_ops hook
to avoid the moderately costly VMREADs on VMX when the tracepoint isn't
enabled.

Opportunistically rename the parameters in the get_exit_info()
declaration to match the names used by both SVM and VMX.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20240910200350.264245-2-mlevitsk@redhat.com
[sean: drop is_guest_mode() change, use intr_info/error_code for names]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm-x86-ops.h
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/trace.h
arch/x86/kvm/vmx/main.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/x86_ops.h