From: "tip-bot for Yan, Zheng" <zheng.z.yan@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
penberg@kernel.org, zheng.z.yan@intel.com, tglx@linutronix.de
Subject: [tip:perf/urgent] perf/x86: Disable uncore on virtualized CPUs
Date: Sat, 20 Oct 2012 01:23:58 -0700 [thread overview]
Message-ID: <tip-a05123bdd1b9ba961ed262864924a5b3ee81afe8@git.kernel.org> (raw)
In-Reply-To: <1345540117-14164-1-git-send-email-zheng.z.yan@intel.com>
Commit-ID: a05123bdd1b9ba961ed262864924a5b3ee81afe8
Gitweb: http://git.kernel.org/tip/a05123bdd1b9ba961ed262864924a5b3ee81afe8
Author: Yan, Zheng <zheng.z.yan@intel.com>
AuthorDate: Tue, 21 Aug 2012 17:08:37 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 20 Oct 2012 10:07:02 +0200
perf/x86: Disable uncore on virtualized CPUs
Initializing uncore PMU on virtualized CPU may hang the kernel.
This is because kvm does not emulate the entire hardware. Thers
are lots of uncore related MSRs, making kvm enumerate them all
is a non-trival task. So just disable uncore on virtualized CPU.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Tested-by: Pekka Enberg <penberg@kernel.org>
Cc: a.p.zijlstra@chello.nl
Cc: eranian@google.com
Cc: andi@firstfloor.org
Cc: avi@redhat.com
Link: http://lkml.kernel.org/r/1345540117-14164-1-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/perf_event_intel_uncore.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 99d96a4..5df8d32 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -2926,6 +2926,9 @@ static int __init intel_uncore_init(void)
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
return -ENODEV;
+ if (cpu_has_hypervisor)
+ return -ENODEV;
+
ret = uncore_pci_init();
if (ret)
goto fail;
prev parent reply other threads:[~2012-10-20 8:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 9:08 [PATCH] perf/x86: Disable uncore on virtualized CPU Yan, Zheng
2012-08-21 12:55 ` Pekka Enberg
2012-08-31 7:12 ` Pekka Enberg
2012-08-21 14:31 ` Andi Kleen
2012-08-21 14:42 ` Pekka Enberg
2012-09-05 6:35 ` Ingo Molnar
2012-09-05 8:47 ` Peter Zijlstra
2012-09-05 9:08 ` Ingo Molnar
2012-09-05 18:52 ` Andi Kleen
2012-10-20 8:23 ` tip-bot for Yan, Zheng [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=tip-a05123bdd1b9ba961ed262864924a5b3ee81afe8@git.kernel.org \
--to=zheng.z.yan@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=penberg@kernel.org \
--cc=tglx@linutronix.de \
/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