All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Jim Mattson <jmattson@google.com>
Cc: Krish Sadhukhan <krish.sadhukhan@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, vkuznets@redhat.com, wanpengli@tencent.com,
	joro@8bytes.org
Subject: Re: [PATCH] KVM: nVMX: nSVM: Show guest mode in kvm_{entry,exit} tracepoints
Date: Tue, 3 Aug 2021 00:03:14 +0000	[thread overview]
Message-ID: <YQiHwtkEhx2AoQtT@google.com> (raw)
In-Reply-To: <CALMp9eQvEA8DDq03ny-EZpr0zjSMBmdiXCEdeaYe8qbvUknbGA@mail.gmail.com>

On Mon, Aug 02, 2021, Jim Mattson wrote:
> On Mon, Aug 2, 2021 at 3:21 PM Krish Sadhukhan <krish.sadhukhan@oracle.com> wrote:
> >
> >
> > On 8/2/21 9:39 AM, Paolo Bonzini wrote:
> > > On 02/08/21 18:34, Sean Christopherson wrote:
> > >> On Mon, Aug 02, 2021, Paolo Bonzini wrote:
> > >>> On 21/06/21 22:43, Krish Sadhukhan wrote:
> > >>>> With this patch KVM entry and exit tracepoints will
> > >>>> show "guest_mode = 0" if it is a guest and "guest_mode = 1" if it is a
> > >>>> nested guest.
> > >>>
> > >>> What about adding a "(nested)" suffix for L2, and nothing for L1?
> > >>
> > >> That'd work too, though it would be nice to get vmcx12 printed as well
> > >> so that it would be possible to determine which L2 is running without
> > >> having to cross-reference other tracepoints.
> > >
> > > Yes, it would be nice but it would also clutter the output a bit.

But with my gross hack, it'd only clutter nested entries/exits.

> > > It's like what we have already in kvm_inj_exception:
> > >
> > >         TP_printk("%s (0x%x)",
> > >                   __print_symbolic(__entry->exception, kvm_trace_sym_exc),
> > >                   /* FIXME: don't print error_code if not present */
> > >                   __entry->has_error ? __entry->error_code : 0)
> > >
> > > It could be done with a trace-cmd plugin, but that creates other issues
> > > since it essentially forces the tracepoints to have a stable API.
> >
> > Also, the vmcs/vmcb address is vCPU-specific, so if L2 runs on 10 vCPUs,
> > traces will show 10 different addresses for the same L2 and it's not
> > convenient on a cloud host where hundreds of L1s and L2s run.
> 
> The vmcx02 address is vCPU-specific. However, Sean asked for the
> vmcx12 address, which is a GPA that is common across all vCPUs.

Ya.  Obviously it doesn't help identifying L2 vCPU relationships, e.g. if an L2 VM
runs 10 vCPUs of its own, but in most cases the sequence of what was run for a
given L1 vCPU is what's interesting and relevant, whereas knowing which L2 vCPUs
belong to which L2 VM isn't often critical information for debug/triage.

      reply	other threads:[~2021-08-03  0:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 20:43 [PATCH] KVM: nVMX: nSVM: Show guest mode in kvm_{entry,exit} tracepoints Krish Sadhukhan
2021-06-21 20:43 ` Krish Sadhukhan
2021-07-30 19:37   ` Sean Christopherson
2021-08-02 14:18   ` Paolo Bonzini
2021-08-02 16:34     ` Sean Christopherson
2021-08-02 16:39       ` Paolo Bonzini
2021-08-02 22:21         ` Krish Sadhukhan
2021-08-02 23:20           ` Jim Mattson
2021-08-03  0:03             ` Sean Christopherson [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=YQiHwtkEhx2AoQtT@google.com \
    --to=seanjc@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=krish.sadhukhan@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.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.