aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-11-18 06:09:54 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:29:41 -0500
commit586f9607962cd982293759a4e95ff06e75be5225 (patch)
treeefce3a218f0268e4a066d1621d594951d6ac569e /arch/x86/kvm/trace.h
parentaa17911e3c21b63e3bf94c580ed029d6dad816b4 (diff)
KVM: Add instruction-set-specific exit qualifications to kvm_exit trace
The exit reason alone is insufficient to understand exactly why an exit occured; add ISA-specific trace parameters for additional information. Because fetching these parameters is expensive on vmx, and because these parameters are fetched even if tracing is disabled, we fetch the parameters via a callback instead of as traditional trace arguments. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r--arch/x86/kvm/trace.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h
index 10610229b248..1357d7cf4ec8 100644
--- a/arch/x86/kvm/trace.h
+++ b/arch/x86/kvm/trace.h
@@ -192,18 +192,22 @@ TRACE_EVENT(kvm_exit,
192 __field( unsigned int, exit_reason ) 192 __field( unsigned int, exit_reason )
193 __field( unsigned long, guest_rip ) 193 __field( unsigned long, guest_rip )
194 __field( u32, isa ) 194 __field( u32, isa )
195 __field( u64, info1 )
196 __field( u64, info2 )
195 ), 197 ),
196 198
197 TP_fast_assign( 199 TP_fast_assign(
198 __entry->exit_reason = exit_reason; 200 __entry->exit_reason = exit_reason;
199 __entry->guest_rip = kvm_rip_read(vcpu); 201 __entry->guest_rip = kvm_rip_read(vcpu);
200 __entry->isa = isa; 202 __entry->isa = isa;
203 kvm_x86_ops->get_exit_info(vcpu, &__entry->info1,
204 &__entry->info2);
201 ), 205 ),
202 206
203 TP_printk("reason %s rip 0x%lx", 207 TP_printk("reason %s rip 0x%lx info %llx %llx",
204 ftrace_print_symbols_seq(p, __entry->exit_reason, 208 ftrace_print_symbols_seq(p, __entry->exit_reason,
205 kvm_x86_ops->exit_reasons_str), 209 kvm_x86_ops->exit_reasons_str),
206 __entry->guest_rip) 210 __entry->guest_rip, __entry->info1, __entry->info2)
207); 211);
208 212
209/* 213/*