mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH v2 0/4] KVM: x86: tracepoint updates
Date: Tue, 26 Sep 2023 11:28:35 +0300	[thread overview]
Message-ID: <abd13162f106c5ce86c211fc9d32d901ab34500b.camel@redhat.com> (raw)
In-Reply-To: <ZRIf1OPjKV66Y17/@google.com>

У пн, 2023-09-25 у 17:03 -0700, Sean Christopherson пише:
> On Sun, Sep 24, 2023, Maxim Levitsky wrote:
> > This patch series is intended to add some selected information
> > to the kvm tracepoints to make it easier to gather insights about
> > running nested guests.
> > 
> > This patch series was developed together with a new x86 performance analysis tool
> > that I developed recently (https://gitlab.com/maximlevitsky/kvmon)
> > which aims to be a better kvm_stat, and allows you at glance
> > to see what is happening in a VM, including nesting.
> 
> Rather than add more and more tracepoints, I think we should be more thoughtful
> about (a) where we place KVM's tracepoints and (b) giving userspace the necessary
> hooks to write BPF programs to extract whatever data is needed at any give time.
> 
> There's simply no way we can iterate fast enough in KVM tracepoints to adapt to
> userspace's debug/monitoring needs.  E.g. if it turns out someone wants detailed
> info on hypercalls that use memory or registers beyond ABCD, the new tracepoints
> won't help them.
> 
> If all KVM tracepoints grab "struct kvm_vcpu" and force VMCS "registers" to be
> cached (or decached depending on one's viewpoint), then I think that'll serve 99%
> of usecases.  E.g. the vCPU gives a BPF program kvm_vcpu, vcpu_{vmx,svm}, kvm, etc.
> 
> trace_kvm_exit is good example, where despite all of the information that is captured
> by KVM, it's borderline worthless for CPUID and MSR exits because their interesting
> information is held in registers and not captured in the VMCS or VMCB.
> 
> There are some on BTF type info issues that I've encountered, but I suspect that's
> as much a PEBKAC problem as anything.
> 

While eBPF has its use cases, none of the extra tracepoints were added solely because of
the monitoring tool and I do understand that tracepoints are a limited resource.

Each added tracepoint/info was added only when it was also found to be useful for regular
kvm tracing.

Best regards,
	Maxim Levitsky


  reply	other threads:[~2023-09-26  8:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24 12:44 Maxim Levitsky
2023-09-24 12:44 ` [PATCH v2 1/4] KVM: x86: refactor req_immediate_exit logic Maxim Levitsky
2023-09-26 16:37   ` Paolo Bonzini
2023-09-28 10:41     ` Maxim Levitsky
2023-09-24 12:44 ` [PATCH v2 2/4] KVM: x86: add more information to the kvm_entry tracepoint Maxim Levitsky
2023-09-26 16:39   ` Paolo Bonzini
2023-09-28 10:41     ` Maxim Levitsky
2023-09-24 12:44 ` [PATCH v2 3/4] KVM: x86: add more information to kvm_exit tracepoint Maxim Levitsky
2023-09-26 16:40   ` Paolo Bonzini
2023-09-28 10:41     ` Maxim Levitsky
2023-09-24 12:44 ` [PATCH v2 4/4] KVM: x86: add new nested vmexit tracepoints Maxim Levitsky
2023-09-26 16:50   ` Paolo Bonzini
2023-09-28 10:42     ` Maxim Levitsky
2023-09-26  0:03 ` [PATCH v2 0/4] KVM: x86: tracepoint updates Sean Christopherson
2023-09-26  8:28   ` Maxim Levitsky [this message]
2023-09-26 16:36     ` Paolo Bonzini
2023-09-26 20:45       ` Sean Christopherson

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=abd13162f106c5ce86c211fc9d32d901ab34500b.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome