• Alexander Shishkin's avatar
    perf/x86/intel/pt: Handle VMX better · ee368428
    Alexander Shishkin authored
    Since commit:
    
      1c5ac21a ("perf/x86/intel/pt: Don't die on VMXON")
    
    ... PT events depend on re-scheduling to get enabled after a VMX session
    has taken place. This is, in particular, a problem for CPU context events,
    which don't normally get re-scheduled, unless there is a reason.
    
    This patch changes the VMX handling so that PT event gets re-enabled
    when VMX root mode exits.
    
    Also, notify the user when there's a gap in PT data due to VMX root
    mode by flagging AUX records as partial.
    
    In combination with vmm_exclusive=0 parameter of the kvm_intel driver,
    this will result in trace gaps only for the duration of the guest's
    timeslices.
    Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    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: vince@deater.net
    Link: http://lkml.kernel.org/r/20170220133352.17995-5-alexander.shishkin@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    ee368428
pt.c 35.3 KB