From: Sean Christopherson <seanjc@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, Jianfeng Gao <jianfeng.gao@intel.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
Kan Liang <kan.liang@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH v2 0/2] perf/x86: KVM: Disable vPMU on hybrid CPUs
Date: Wed, 8 Feb 2023 20:42:28 +0000 [thread overview]
Message-ID: <20230208204230.1360502-1-seanjc@google.com> (raw)
Disable vPMU support in KVM when running on hybrid CPUs to avoid inducing
#GPs and other issues in guests. This is intended to be a stopgap to
prevent unwitting KVM users from shooting themselves in the foot until KVM
KVM gets proper enabling for hybrid CPUs.
Effectively squash exporting PMU capabilities from perf until it too gets
proper enabling.
v2:
- Disable vPMU on hybrid CPUs in KVM _and_ in perf. [Like]
- Use X86_FEATURE_HYBRID_CPU instead of is_hybrid().
- Tweak comments/changelogs to more clearly state that there are options
beyond pinning vCPUs (though they still need KVM support). [Like]
v1: https://lore.kernel.org/all/20230120004051.2043777-1-seanjc@google.com
Sean Christopherson (2):
KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs)
perf/x86: Refuse to export capabilities for hybrid PMUs
arch/x86/events/core.c | 14 ++++++++------
arch/x86/kvm/pmu.h | 26 +++++++++++++++++++-------
2 files changed, 27 insertions(+), 13 deletions(-)
base-commit: 7cb79f433e75b05d1635aefaa851cfcd1cb7dc4f
--
2.39.1.519.gcb327c4b5f-goog
next reply other threads:[~2023-02-08 20:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 20:42 Sean Christopherson [this message]
2023-02-08 20:42 ` [PATCH v2 1/2] KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs) Sean Christopherson
2023-02-08 20:42 ` [PATCH v2 2/2] perf/x86: Refuse to export capabilities for hybrid PMUs Sean Christopherson
2023-02-15 13:27 ` [PATCH v2 0/2] perf/x86: KVM: Disable vPMU on hybrid CPUs 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=20230208204230.1360502-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jianfeng.gao@intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).