]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Tone down kernel messages when the PMU check fails in a virtual environment
authorWei Huang <wei@redhat.com>
Thu, 25 Sep 2014 03:55:14 +0000 (22:55 -0500)
committerIngo Molnar <mingo@kernel.org>
Fri, 3 Oct 2014 04:04:41 +0000 (06:04 +0200)
commit2eeb41abf313877fd8fd6a1ccad3d4491136dd7a
treec5d83e123343f190f2ad235cc01dd6750844ea53
parentf7a5633661077309d3dea2df0d329a0a4744554e
perf/x86: Tone down kernel messages when the PMU check fails in a virtual environment

PMU checking can fail due to various reasons. On native machine, this
is mostly caused by faulty hardware and it is reasonable to use
KERN_ERR in reporting. However, when kernel is running on virtualized
environment, this checking can fail if virtual PMU is not supported
(e.g. KVM on AMD host). It is annoying to see an error message on
splash screen, even though we know such failure is benign on
virtualized environment.

This patch checks if the kernel is running in a virtualized environment.
If so, it will use KERN_INFO in reporting, which reduces the syslog
priority of them. This patch was tested successfully on KVM.

Signed-off-by: Wei Huang <wei@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Link: http://lkml.kernel.org/r/1411617314-24659-1-git-send-email-wei@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event.c