lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-a05123bdd1b9ba961ed262864924a5b3ee81afe8@git.kernel.org>
Date:	Sat, 20 Oct 2012 01:23:58 -0700
From:	"tip-bot for Yan, Zheng" <zheng.z.yan@...el.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	penberg@...nel.org, zheng.z.yan@...el.com, tglx@...utronix.de
Subject: [tip:perf/urgent] perf/x86: Disable uncore on virtualized CPUs

Commit-ID:  a05123bdd1b9ba961ed262864924a5b3ee81afe8
Gitweb:     http://git.kernel.org/tip/a05123bdd1b9ba961ed262864924a5b3ee81afe8
Author:     Yan, Zheng <zheng.z.yan@...el.com>
AuthorDate: Tue, 21 Aug 2012 17:08:37 +0800
Committer:  Ingo Molnar <mingo@...nel.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@...el.com>
Tested-by: Pekka Enberg <penberg@...nel.org>
Cc: a.p.zijlstra@...llo.nl
Cc: eranian@...gle.com
Cc: andi@...stfloor.org
Cc: avi@...hat.com
Link: http://lkml.kernel.org/r/1345540117-14164-1-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ