diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2012-08-21 05:08:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-20 04:07:02 -0400 |
commit | a05123bdd1b9ba961ed262864924a5b3ee81afe8 (patch) | |
tree | 4005c7e92db9aea00358e69d3e1c5a3db24843e9 /arch | |
parent | 31fd84b95eb211d5db460a1dda85e004800a7b52 (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 99d96a4978b5..5df8d32ba91e 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) | |||
2926 | if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) | 2926 | if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) |
2927 | return -ENODEV; | 2927 | return -ENODEV; |
2928 | 2928 | ||
2929 | if (cpu_has_hypervisor) | ||
2930 | return -ENODEV; | ||
2931 | |||
2929 | ret = uncore_pci_init(); | 2932 | ret = uncore_pci_init(); |
2930 | if (ret) | 2933 | if (ret) |
2931 | goto fail; | 2934 | goto fail; |