All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mingwei Zhang <mizhang@google.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm <kvm@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	David Matlack <dmatlack@google.com>
Subject: Re: [PATCH] kvm: nVMX: add tracepoint for kvm:kvm_nested_vmrun
Date: Wed, 29 Jun 2022 23:10:41 +0000	[thread overview]
Message-ID: <Yrzb8c3g6C/aL8+B@google.com> (raw)
In-Reply-To: <YrnBLLRljyHCyeOe@google.com>


> > diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> > index f5cb18e00e78..29cc36cf2568 100644
> > --- a/arch/x86/kvm/vmx/nested.c
> > +++ b/arch/x86/kvm/vmx/nested.c
> > @@ -3367,6 +3367,13 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
> >       };
> >       u32 failed_index;
> >
> > +     trace_kvm_nested_vmrun(
> > +             kvm_rip_read(vcpu), vmx->nested.current_vmptr,
> > +             vmcs12->guest_rip,
>
> Be consistent; either put each parameter on it's own line or wrap only when
> necessary.

will do.

>
> > +             vmcs12->guest_intr_status,
> > +             vmcs12->vm_entry_intr_info_field,
> > +             vmcs12->secondary_vm_exec_control & SECONDARY_EXEC_ENABLE_EPT);
> > +
>
> Align the parameters to the opening '(', that "rule" trumps the 80 char soft limit.

will do.

>
>         trace_kvm_nested_vmrun(kvm_rip_read(vcpu),
>                                vmx->nested.current_vmptr,
>                                vmcs12->guest_rip,
>                                vmcs12->guest_intr_status,
>                                vmcs12->vm_entry_intr_info_field,
>                                vmcs12->secondary_vm_exec_control & SECONDARY_EXEC_ENABLE_EPT);
>
> And if we're going to add nVMX, we should clean up the tracepoint output.  E.g.
> pass in KVM_ISA_{SVM,VMX} to different VMCB vs. VMCS and npt vs. ept (and maybe
> print nNPT and nEPT to make it obvious it's the vmcs12 setting?).  The "nrip"
> field is wrong even for SVM; the tracepoint prints the L2 rip, not the next_rip
> field in vmcs12.  Maybe "L2 rip"?

I can change the 'nrip' to 'nested rip', since it may not necessarily
the 'L2 rip'.

For the others, will do.


      reply	other threads:[~2022-06-29 23:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26 20:05 [PATCH] kvm: nVMX: add tracepoint for kvm:kvm_nested_vmrun Mingwei Zhang
2022-06-27 14:39 ` Sean Christopherson
2022-06-29 23:10   ` Mingwei Zhang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yrzb8c3g6C/aL8+B@google.com \
    --to=mizhang@google.com \
    --cc=dmatlack@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.