From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753582AbdBNOD2 (ORCPT ); Tue, 14 Feb 2017 09:03:28 -0500 Received: from merlin.infradead.org ([205.233.59.134]:46800 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237AbdBNOC1 (ORCPT ); Tue, 14 Feb 2017 09:02:27 -0500 Date: Tue, 14 Feb 2017 15:02:20 +0100 From: Peter Zijlstra To: Alexander Shishkin Cc: Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Borislav Petkov , Thomas Gleixner Subject: Re: [PATCH 2/2] perf/x86/intel/pt: Fail event creation if VMX operation is on Message-ID: <20170214140220.GO6500@twins.programming.kicks-ass.net> References: <20170214132416.26400-1-alexander.shishkin@linux.intel.com> <20170214132416.26400-3-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170214132416.26400-3-alexander.shishkin@linux.intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?