From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Like Xu <like.xu.linux@gmail.com>
Subject: [PATCH 0/3] KVM: x86: Intel PERF_CAPABILITIES fix and cleanups
Date: Wed, 27 Jul 2022 23:34:21 +0000 [thread overview]
Message-ID: <20220727233424.2968356-1-seanjc@google.com> (raw)
Fix a bug where KVM doesn't refresh the vPMU after userspace writes
PERF_CAPABILITIES, and then leverage that fix to avoiding checking
guest_cpuid_has(X86_FEATURE_PDCM) during VM-Enter, which is slow enough
that it shows up in perf traces[*].
[*] https://gist.github.com/avagin/f50a6d569440c9ae382281448c187f4e
Sean Christopherson (3):
KVM: x86: Refresh PMU after writes to MSR_IA32_PERF_CAPABILITIES
KVM: VMX: Use proper type-safe functions for vCPU => LBRs helpers
KVM: VMX: Adjust number of LBR records for PERF_CAPABILITIES at
refresh
arch/x86/kvm/vmx/pmu_intel.c | 12 +++---------
arch/x86/kvm/vmx/vmx.h | 29 ++++++++++++++++++++---------
arch/x86/kvm/x86.c | 4 ++--
3 files changed, 25 insertions(+), 20 deletions(-)
base-commit: 1a4d88a361af4f2e91861d632c6a1fe87a9665c2
--
2.37.1.359.gd136c6c3e2-goog
next reply other threads:[~2022-07-27 23:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 23:34 Sean Christopherson [this message]
2022-07-27 23:34 ` [PATCH 1/3] KVM: x86: Refresh PMU after writes to MSR_IA32_PERF_CAPABILITIES Sean Christopherson
2022-07-28 12:02 ` Like Xu
2022-07-28 15:27 ` Sean Christopherson
2022-07-29 9:33 ` Like Xu
2022-07-29 13:51 ` Sean Christopherson
2022-08-03 12:29 ` Like Xu
2022-08-03 14:37 ` Sean Christopherson
2022-08-03 18:47 ` Sean Christopherson
2022-07-27 23:34 ` [PATCH 2/3] KVM: VMX: Use proper type-safe functions for vCPU => LBRs helpers Sean Christopherson
2022-07-29 8:39 ` Like Xu
2022-07-29 16:08 ` Sean Christopherson
2022-07-27 23:34 ` [PATCH 3/3] KVM: VMX: Adjust number of LBR records for PERF_CAPABILITIES at refresh Sean Christopherson
2022-07-29 10:10 ` Like Xu
2022-07-29 17:28 ` Sean Christopherson
2022-08-02 12:04 ` Like Xu
2022-08-02 14:57 ` Sean Christopherson
2022-08-10 13:24 ` [PATCH 0/3] KVM: x86: Intel PERF_CAPABILITIES fix and cleanups Paolo Bonzini
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=20220727233424.2968356-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=like.xu.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.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