]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel/pt: Don't die on VMXON
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tue, 29 Mar 2016 14:43:10 +0000 (17:43 +0300)
committerIngo Molnar <mingo@kernel.org>
Thu, 28 Apr 2016 08:32:42 +0000 (10:32 +0200)
commit9ae6685bdc4657b89d89d5c0d1572e3e27c4f976
treee17bdbe1029aa8ff7a8efa77874947e5b3caa901
parent00d1669236fe82b74254c8cd2643efa892efd7f9
perf/x86/intel/pt: Don't die on VMXON

Some versions of Intel PT do not support tracing across VMXON, more
specifically, VMXON will clear TraceEn control bit and any attempt to
set it before VMXOFF will throw a #GP, which in the current state of
things will crash the kernel. Namely:

  $ perf record -e intel_pt// kvm -nographic

on such a machine will kill it.

To avoid this, notify the intel_pt driver before VMXON and after
VMXOFF so that it knows when not to enable itself.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: hpa@zytor.com
Link: http://lkml.kernel.org/r/87oa9dwrfk.fsf@ashishki-desk.ger.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/pt.c
arch/x86/events/intel/pt.h
arch/x86/include/asm/perf_event.h
arch/x86/kvm/vmx.c