diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch b/meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch deleted file mode 100644 index 56c563cea3..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/0006-fix-KVM-x86-Add-intr-vectoring-info-and-error-code-t.patch +++ /dev/null | |||
@@ -1,124 +0,0 @@ | |||
1 | From a6334775b763c187d84914e89a0b835a793ae0fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Jeanson <mjeanson@efficios.com> | ||
3 | Date: Mon, 26 Oct 2020 14:11:17 -0400 | ||
4 | Subject: [PATCH 06/16] fix: KVM: x86: Add intr/vectoring info and error code | ||
5 | to kvm_exit tracepoint (v5.10) | ||
6 | |||
7 | See upstream commit : | ||
8 | |||
9 | commit 235ba74f008d2e0936b29f77f68d4e2f73ffd24a | ||
10 | Author: Sean Christopherson <sean.j.christopherson@intel.com> | ||
11 | Date: Wed Sep 23 13:13:46 2020 -0700 | ||
12 | |||
13 | KVM: x86: Add intr/vectoring info and error code to kvm_exit tracepoint | ||
14 | |||
15 | Extend the kvm_exit tracepoint to align it with kvm_nested_vmexit in | ||
16 | terms of what information is captured. On SVM, add interrupt info and | ||
17 | error code, while on VMX it add IDT vectoring and error code. This | ||
18 | sets the stage for macrofying the kvm_exit tracepoint definition so that | ||
19 | it can be reused for kvm_nested_vmexit without loss of information. | ||
20 | |||
21 | Opportunistically stuff a zero for VM_EXIT_INTR_INFO if the VM-Enter | ||
22 | failed, as the field is guaranteed to be invalid. Note, it'd be | ||
23 | possible to further filter the interrupt/exception fields based on the | ||
24 | VM-Exit reason, but the helper is intended only for tracepoints, i.e. | ||
25 | an extra VMREAD or two is a non-issue, the failed VM-Enter case is just | ||
26 | low hanging fruit. | ||
27 | |||
28 | Upstream-Status: Backport | ||
29 | |||
30 | Signed-off-by: Michael Jeanson <mjeanson@efficios.com> | ||
31 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
32 | Change-Id: I638fa29ef7d8bb432de42a33f9ae4db43259b915 | ||
33 | --- | ||
34 | .../events/lttng-module/arch/x86/kvm/trace.h | 55 ++++++++++++++++++- | ||
35 | 1 file changed, 53 insertions(+), 2 deletions(-) | ||
36 | |||
37 | diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h | ||
38 | index 4416ae02..0917b51f 100644 | ||
39 | --- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h | ||
40 | +++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h | ||
41 | @@ -115,6 +115,37 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic, kvm_x86_apic, | ||
42 | /* | ||
43 | * Tracepoint for kvm guest exit: | ||
44 | */ | ||
45 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0)) | ||
46 | +LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit, | ||
47 | + TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa), | ||
48 | + TP_ARGS(exit_reason, vcpu, isa), | ||
49 | + | ||
50 | + TP_locvar( | ||
51 | + u64 info1, info2; | ||
52 | + u32 intr_info, error_code; | ||
53 | + ), | ||
54 | + | ||
55 | + TP_code_pre( | ||
56 | + kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1, | ||
57 | + &tp_locvar->info2, | ||
58 | + &tp_locvar->intr_info, | ||
59 | + &tp_locvar->error_code); | ||
60 | + ), | ||
61 | + | ||
62 | + TP_FIELDS( | ||
63 | + ctf_integer(unsigned int, exit_reason, exit_reason) | ||
64 | + ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu)) | ||
65 | + ctf_integer(u32, isa, isa) | ||
66 | + ctf_integer(u64, info1, tp_locvar->info1) | ||
67 | + ctf_integer(u64, info2, tp_locvar->info2) | ||
68 | + ctf_integer(u32, intr_info, tp_locvar->intr_info) | ||
69 | + ctf_integer(u32, error_code, tp_locvar->error_code) | ||
70 | + ctf_integer(unsigned int, vcpu_id, vcpu->vcpu_id) | ||
71 | + ), | ||
72 | + | ||
73 | + TP_code_post() | ||
74 | +) | ||
75 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) | ||
76 | LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit, | ||
77 | TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa), | ||
78 | TP_ARGS(exit_reason, vcpu, isa), | ||
79 | @@ -124,13 +155,32 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit, | ||
80 | ), | ||
81 | |||
82 | TP_code_pre( | ||
83 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) | ||
84 | kvm_x86_ops.get_exit_info(vcpu, &tp_locvar->info1, | ||
85 | &tp_locvar->info2); | ||
86 | + ), | ||
87 | + | ||
88 | + TP_FIELDS( | ||
89 | + ctf_integer(unsigned int, exit_reason, exit_reason) | ||
90 | + ctf_integer(unsigned long, guest_rip, kvm_rip_read(vcpu)) | ||
91 | + ctf_integer(u32, isa, isa) | ||
92 | + ctf_integer(u64, info1, tp_locvar->info1) | ||
93 | + ctf_integer(u64, info2, tp_locvar->info2) | ||
94 | + ), | ||
95 | + | ||
96 | + TP_code_post() | ||
97 | +) | ||
98 | #else | ||
99 | +LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit, | ||
100 | + TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa), | ||
101 | + TP_ARGS(exit_reason, vcpu, isa), | ||
102 | + | ||
103 | + TP_locvar( | ||
104 | + u64 info1, info2; | ||
105 | + ), | ||
106 | + | ||
107 | + TP_code_pre( | ||
108 | kvm_x86_ops->get_exit_info(vcpu, &tp_locvar->info1, | ||
109 | &tp_locvar->info2); | ||
110 | -#endif | ||
111 | ), | ||
112 | |||
113 | TP_FIELDS( | ||
114 | @@ -143,6 +193,7 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit, | ||
115 | |||
116 | TP_code_post() | ||
117 | ) | ||
118 | +#endif | ||
119 | |||
120 | /* | ||
121 | * Tracepoint for kvm interrupt injection: | ||
122 | -- | ||
123 | 2.25.1 | ||
124 | |||