kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Suleiman Souhlal <suleiman@google.com>
Cc: Wei Zhang <zhanwei@google.com>, Sangwhan Moon <sxm@google.com>,
	Ingo Molnar <mingo@redhat.com>,
	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@vger.kernel.org, Linux Kernel <linux-kernel@vger.kernel.org>,
	Jing Zhang <jingzhangos@google.com>,
	David Matlack <dmatlack@google.com>
Subject: Re: [PATCH 0/2] KVM: x86: Fix incorrect VM-exit profiling
Date: Wed, 18 May 2022 15:34:38 +0000	[thread overview]
Message-ID: <YoUSDmKrE6ryO4XB@google.com> (raw)
In-Reply-To: <CABCjUKCCc2irAnJrGWfKAnXJj-pb=YNL4F0uAEr-c0LMX22_hw@mail.gmail.com>

On Wed, May 18, 2022, Suleiman Souhlal wrote:
> On Tue, May 17, 2022 at 4:30 AM Wei Zhang <zhanwei@google.com> wrote:
> >
> > > Please don't top-post.  From https://people.kernel.org/tglx/notes-about-netiquette:
> >
> > Ah, I didn't know this should be avoided. Thanks for the info!
> >
> > > My preference would be to find a more complete, KVM-specific solution.  The
> > > profiling stuff seems like it's a dead end, i.e. will always be flawed in some
> > > way.  If this cleanup didn't require a new hypercall then I wouldn't care, but
> > > I don't love having to extend KVM's guest/host ABI for something that ideally
> > > will become obsolete sooner than later.
> >
> > I also feel that adding a new hypercall is too much here. A
> > KVM-specific solution is definitely better, and the eBPF based
> > approach you mentioned sounds like the ultimate solution (at least for
> > inspecting exit reasons).
> >
> > +Suleiman What do you think? The on-going work Sean described sounds
> > promising, perhaps we should put this patch aside for the time being.
> 
> I'm ok with that.
> That said, the advantage of the current solution is that it already
> exists and is very easy to use, by anyone, without having to write any
> code. The proposed solution doesn't sound like it will be as easy.

My goal/hope is to make the eBPF approach just as easy by providing/building a
library of KVM eBPF programs in tools/ so that doing common things like profiling
VM-Exits doesn't require reinventing the wheel.  And those programs could be used
(and thus implicitly tested) by KVM selftests to verify the kernel functionality.

      reply	other threads:[~2022-05-18 15:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 19:58 [PATCH 0/2] KVM: x86: Fix incorrect VM-exit profiling Wei Zhang
2022-04-12 19:58 ` [PATCH 1/2] KVM: x86: allow guest to send its _stext for kvm profiling Wei Zhang
2022-05-09 23:55   ` Sean Christopherson
2022-05-11 16:45     ` Wei Zhang
2022-04-12 19:58 ` [PATCH 2/2] KVM: x86: illustrative example for sending guest _stext with a hypercall Wei Zhang
2022-05-09 23:57 ` [PATCH 0/2] KVM: x86: Fix incorrect VM-exit profiling Sean Christopherson
2022-05-11 16:45   ` Wei Zhang
2022-05-11 19:42     ` Sean Christopherson
2022-05-16 19:30       ` Wei Zhang
2022-05-18  4:27         ` Suleiman Souhlal
2022-05-18 15:34           ` 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=YoUSDmKrE6ryO4XB@google.com \
    --to=seanjc@google.com \
    --cc=dmatlack@google.com \
    --cc=jingzhangos@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=suleiman@google.com \
    --cc=sxm@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=zhanwei@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).