diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-10-09 10:08:30 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 02:32:16 -0500 |
commit | 236649de3360916ef85f95c82723af17a25b9179 (patch) | |
tree | 48cc0be4905254408ccac916dd4ca8205074a17f | |
parent | 17897f366847a9ef8a13e3671a0eb1c15422abed (diff) |
KVM: SVM: Add tracepoint for #vmexit because intr pending
This patch adds a special tracepoint for the event that a
nested #vmexit is injected because kvm wants to inject an
interrupt into the guest.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r-- | arch/x86/kvm/svm.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/trace.h | 18 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 1 |
3 files changed, 20 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 369eeb86e87c..78a391c60a75 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1390,7 +1390,7 @@ static inline int nested_svm_intr(struct vcpu_svm *svm) | |||
1390 | * the #vmexit here. | 1390 | * the #vmexit here. |
1391 | */ | 1391 | */ |
1392 | svm->nested.exit_required = true; | 1392 | svm->nested.exit_required = true; |
1393 | nsvm_printk("VMexit -> INTR\n"); | 1393 | trace_kvm_nested_intr_vmexit(svm->vmcb->save.rip); |
1394 | return 1; | 1394 | return 1; |
1395 | } | 1395 | } |
1396 | 1396 | ||
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index 4d6bb5ee39b5..3cc8f444be14 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h | |||
@@ -451,6 +451,24 @@ TRACE_EVENT(kvm_nested_vmexit_inject, | |||
451 | __entry->exit_info1, __entry->exit_info2, | 451 | __entry->exit_info1, __entry->exit_info2, |
452 | __entry->exit_int_info, __entry->exit_int_info_err) | 452 | __entry->exit_int_info, __entry->exit_int_info_err) |
453 | ); | 453 | ); |
454 | |||
455 | /* | ||
456 | * Tracepoint for nested #vmexit because of interrupt pending | ||
457 | */ | ||
458 | TRACE_EVENT(kvm_nested_intr_vmexit, | ||
459 | TP_PROTO(__u64 rip), | ||
460 | TP_ARGS(rip), | ||
461 | |||
462 | TP_STRUCT__entry( | ||
463 | __field( __u64, rip ) | ||
464 | ), | ||
465 | |||
466 | TP_fast_assign( | ||
467 | __entry->rip = rip | ||
468 | ), | ||
469 | |||
470 | TP_printk("rip: 0x%016llx\n", __entry->rip) | ||
471 | ); | ||
454 | #endif /* _TRACE_KVM_H */ | 472 | #endif /* _TRACE_KVM_H */ |
455 | 473 | ||
456 | /* This part must be outside protection */ | 474 | /* This part must be outside protection */ |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a522d9ba81b3..2cf4146b425a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -4987,3 +4987,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_cr); | |||
4987 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmrun); | 4987 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmrun); |
4988 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit); | 4988 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit); |
4989 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit_inject); | 4989 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_vmexit_inject); |
4990 | EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_nested_intr_vmexit); | ||