diff options
author | Peter Xu <peterx@redhat.com> | 2019-09-05 22:17:19 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-09-10 13:13:18 -0400 |
commit | d94fdcd7eafbb9fcdd0fe4b32d41359382b8a58a (patch) | |
tree | 16d00500a20e5321683f64423144971e83760bbe /arch/x86/kvm/trace.h | |
parent | 32d1d15c52c17a7f0368e6a7084796e16ec481d3 (diff) |
KVM: X86: Trace vcpu_id for vmexit
Tracing the ID helps to pair vmenters and vmexits for guests with
multiple vCPUs.
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Peter Xu <peterx@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.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index 6ce853a2e867..4ec33bdc2439 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h | |||
@@ -232,17 +232,20 @@ TRACE_EVENT(kvm_exit, | |||
232 | __field( u32, isa ) | 232 | __field( u32, isa ) |
233 | __field( u64, info1 ) | 233 | __field( u64, info1 ) |
234 | __field( u64, info2 ) | 234 | __field( u64, info2 ) |
235 | __field( unsigned int, vcpu_id ) | ||
235 | ), | 236 | ), |
236 | 237 | ||
237 | TP_fast_assign( | 238 | TP_fast_assign( |
238 | __entry->exit_reason = exit_reason; | 239 | __entry->exit_reason = exit_reason; |
239 | __entry->guest_rip = kvm_rip_read(vcpu); | 240 | __entry->guest_rip = kvm_rip_read(vcpu); |
240 | __entry->isa = isa; | 241 | __entry->isa = isa; |
242 | __entry->vcpu_id = vcpu->vcpu_id; | ||
241 | kvm_x86_ops->get_exit_info(vcpu, &__entry->info1, | 243 | kvm_x86_ops->get_exit_info(vcpu, &__entry->info1, |
242 | &__entry->info2); | 244 | &__entry->info2); |
243 | ), | 245 | ), |
244 | 246 | ||
245 | TP_printk("reason %s rip 0x%lx info %llx %llx", | 247 | TP_printk("vcpu %u reason %s rip 0x%lx info %llx %llx", |
248 | __entry->vcpu_id, | ||
246 | (__entry->isa == KVM_ISA_VMX) ? | 249 | (__entry->isa == KVM_ISA_VMX) ? |
247 | __print_symbolic(__entry->exit_reason, VMX_EXIT_REASONS) : | 250 | __print_symbolic(__entry->exit_reason, VMX_EXIT_REASONS) : |
248 | __print_symbolic(__entry->exit_reason, SVM_EXIT_REASONS), | 251 | __print_symbolic(__entry->exit_reason, SVM_EXIT_REASONS), |