From: "Liang, Kan" <kan.liang@linux.intel.com>
To: "陈培鸿(乘鸿)" <chenpeihong.cph@alibaba-inc.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Jiri Olsa" <jolsa@kernel.org>, "Ian Rogers" <irogers@google.com>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>, x86 <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: "郑翔(正翔)" <zx283061@alibaba-inc.com>, 赵生龙 <shenglong.zsl@alibaba-inc.com>
Subject: Re: [PATCH] perf/x86/intel/uncore: Enable uncore on vCPUs when using uncore discovery
Date: Tue, 24 Sep 2024 09:51:01 -0400 [thread overview]
Message-ID: <73e999cd-93c3-49e0-bac2-0e2c6efe4110@linux.intel.com> (raw)
In-Reply-To: <d420bcf0-5651-41f7-81c9-1c8155bd6bcc.chenpeihong.cph@alibaba-inc.com>
On 2024-09-23 10:47 p.m., 陈培鸿(乘鸿) wrote:
> With uncore discovery, kvm can choose to expose a subset of
> uncore related MSRs it wants to guest by emulate the uncore
> discovery device.
I don't hear that the KVM has started to support uncore vPMU.
Can you please point me to patches?
The default of uncore_no_discover is 0. So it bypasses the HYPERVISOR
check unless the user specially sets the value. It could be a problem
for the earlier platforms which don't support discovery
table. How do you plan to emulate the devices on earlier platforms?
Thanks,
Kan
> So we can enable uncore on virtualized CPUs
> when uncore discovery is using.
> Signed-off-by: Cheng Hong <chenpeihong.cph@alibaba-inc.com>
> ---
> arch/x86/events/intel/uncore.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
> index d98fac567684..33776df95aa4 100644
> --- a/arch/x86/events/intel/uncore.c
> +++ b/arch/x86/events/intel/uncore.c
> @@ -1920,7 +1920,7 @@ static int __init intel_uncore_init(void)
> struct intel_uncore_init_fun *uncore_init;
> int pret = 0, cret = 0, mret = 0, ret;
> - if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
> + if (uncore_no_discover && boot_cpu_has(X86_FEATURE_HYPERVISOR))
> return -ENODEV;
> __uncore_max_dies =
next parent reply other threads:[~2024-09-24 13:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <d420bcf0-5651-41f7-81c9-1c8155bd6bcc.chenpeihong.cph@alibaba-inc.com>
2024-09-24 13:51 ` Liang, Kan [this message]
[not found] ` <b8b078bb-c8d7-428b-8a74-b3977563e6d4.chenpeihong.cph@alibaba-inc.com>
2024-09-25 13:05 ` 回复:[PATCH] " Liang, Kan
[not found] ` <bd65cf32-c2f8-42e4-a01d-fcd927000c24.chenpeihong.cph@alibaba-inc.com>
2024-09-26 13:47 ` 回复:回复:[PATCH] " Liang, Kan
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=73e999cd-93c3-49e0-bac2-0e2c6efe4110@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=chenpeihong.cph@alibaba-inc.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=jolsa@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=peterz@infradead.org \
--cc=shenglong.zsl@alibaba-inc.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zx283061@alibaba-inc.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
all inboxes | Powered by JetHome®