Commit d94fdcd7 authored by Peter Xu's avatar Peter Xu Committed by Paolo Bonzini

KVM: X86: Trace vcpu_id for vmexit

Tracing the ID helps to pair vmenters and vmexits for guests with
multiple vCPUs.
Reviewed-by: default avatarKrish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 32d1d15c
...@@ -232,17 +232,20 @@ TRACE_EVENT(kvm_exit, ...@@ -232,17 +232,20 @@ TRACE_EVENT(kvm_exit,
__field( u32, isa ) __field( u32, isa )
__field( u64, info1 ) __field( u64, info1 )
__field( u64, info2 ) __field( u64, info2 )
__field( unsigned int, vcpu_id )
), ),
TP_fast_assign( TP_fast_assign(
__entry->exit_reason = exit_reason; __entry->exit_reason = exit_reason;
__entry->guest_rip = kvm_rip_read(vcpu); __entry->guest_rip = kvm_rip_read(vcpu);
__entry->isa = isa; __entry->isa = isa;
__entry->vcpu_id = vcpu->vcpu_id;
kvm_x86_ops->get_exit_info(vcpu, &__entry->info1, kvm_x86_ops->get_exit_info(vcpu, &__entry->info1,
&__entry->info2); &__entry->info2);
), ),
TP_printk("reason %s rip 0x%lx info %llx %llx", TP_printk("vcpu %u reason %s rip 0x%lx info %llx %llx",
__entry->vcpu_id,
(__entry->isa == KVM_ISA_VMX) ? (__entry->isa == KVM_ISA_VMX) ?
__print_symbolic(__entry->exit_reason, VMX_EXIT_REASONS) : __print_symbolic(__entry->exit_reason, VMX_EXIT_REASONS) :
__print_symbolic(__entry->exit_reason, SVM_EXIT_REASONS), __print_symbolic(__entry->exit_reason, SVM_EXIT_REASONS),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment