Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on
From: Peter Zijlstra
Date: Tue Feb 14 2017 - 09:03:30 EST
On Tue, Feb 14, 2017 at 03:24:16PM +0200, Alexander Shishkin wrote:
> On systems where PT does not coexist with VMX, users get confused when
> PT turns up with no data because they forgot they're running a kvm
> session at the same time.
> This patch adds a preemptive check for any active VMX operations that
> will fail event creation. This does not provide any guarantees or
> protection against racing with a kvm starting in parallel, but is
> intended to serve as a hint for the user. If VMXON happens after an
> event had been created, the event will still produce an empty trace.
Would it not be more sensible to write fake PT packets in
intel_pt_handle_vmx() to demarcate VMX regions in the trace?