Re: [PATCH 6/7] KVM: x86: Use common definition for kvm_nested_vmexit tracepoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 21, 2020 at 03:59:06PM +0200, Vitaly Kuznetsov wrote:
> Sean Christopherson <sean.j.christopherson@xxxxxxxxx> writes:
> 
> > On Mon, Jul 20, 2020 at 06:52:15PM +0200, Vitaly Kuznetsov wrote:
> >> Sean Christopherson <sean.j.christopherson@xxxxxxxxx> writes:
> >> > +TRACE_EVENT_KVM_EXIT(kvm_nested_vmexit);
> >> >  
> >> >  /*
> >> >   * Tracepoint for #VMEXIT reinjected to the guest
> >> > diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> >> > index fc70644b916ca..f437d99f4db09 100644
> >> > --- a/arch/x86/kvm/vmx/nested.c
> >> > +++ b/arch/x86/kvm/vmx/nested.c
> >> > @@ -5912,10 +5912,7 @@ bool nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu)
> >> >  	exit_intr_info = vmx_get_intr_info(vcpu);
> >> >  	exit_qual = vmx_get_exit_qual(vcpu);
> >> >  
> >> > -	trace_kvm_nested_vmexit(vcpu, exit_reason, exit_qual,
> >> > -				vmx->idt_vectoring_info, exit_intr_info,
> >> > -				vmcs_read32(VM_EXIT_INTR_ERROR_CODE),
> >> > -				KVM_ISA_VMX);
> >> > +	trace_kvm_nested_vmexit(exit_reason, vcpu, KVM_ISA_VMX);
> >> >  
> >> >  	/* If L0 (KVM) wants the exit, it trumps L1's desires. */
> >> >  	if (nested_vmx_l0_wants_exit(vcpu, exit_reason))
> >> 
> >> With so many lines removed I'm almost in love with the patch! However,
> >> when testing on SVM (unrelated?) my trace log looks a bit ugly:
> >> 
> >>            <...>-315119 [010]  3733.092646: kvm_nested_vmexit:    CAN'T FIND FIELD "rip"<CANT FIND FIELD exit_code>vcpu 0 reason npf rip 0x400433 info1 0x0000000200000006 info2 0x0000000000641000 intr_info 0x00000000 error_code 0x00000000
> >>            <...>-315119 [010]  3733.092655: kvm_nested_vmexit:    CAN'T FIND FIELD "rip"<CANT FIND FIELD exit_code>vcpu 0 reason npf rip 0x400433 info1 0x0000000100000014 info2 0x0000000000400000 intr_info 0x00000000 error_code 0x00000000
> >> 
> >> ...
> >> 
> >> but after staring at this for some time I still don't see where this
> >> comes from :-( ... but reverting this commit helps:
> >
> > The CAN'T FIND FIELD blurb comes from tools/lib/traceevent/event-parse.c.
> >
> > I assume you are using tooling of some form to generate the trace, i.e. the
> > issue doesn't show up in /sys/kernel/debug/tracing/trace.  If that's the
> > case, this is more or less ABI breakage :-(
> >  
> 
> Right you are,
> 
> the tool is called 'trace-cmd record -e kvm ...' / 'trace-cmd report'

Paolo, any thoughts on how to proceed with this series?  E.g. merge KVM
first and fix trace-cmd second?  Something else?



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux