From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934795AbcDMKxi (ORCPT ); Wed, 13 Apr 2016 06:53:38 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34706 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934619AbcDMKxh (ORCPT ); Wed, 13 Apr 2016 06:53:37 -0400 Date: Wed, 13 Apr 2016 12:53:31 +0200 From: Ingo Molnar To: Alexander Shishkin Cc: Peter Zijlstra , Gleb Natapov , Paolo Bonzini , x86@kernel.org, kvm@vger.kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, Arnaldo Carvalho de Melo , Borislav Petkov Subject: Re: [PATCH] perf/x86/intel/pt: Don't die on VMXON Message-ID: <20160413105331.GA30907@gmail.com> References: <1459527854-5899-1-git-send-email-alexander.shishkin@linux.intel.com> <20160406085227.GO3448@twins.programming.kicks-ass.net> <87vb3v56x2.fsf@ashishki-desk.ger.corp.intel.com> <20160406115215.GK2906@worktop> <871t6izv9z.fsf@ashishki-desk.ger.corp.intel.com> <20160413094951.GC6430@gmail.com> <87r3e9x0hi.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r3e9x0hi.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Alexander Shishkin wrote: > Ingo Molnar writes: > > >> @@ -3144,6 +3146,8 @@ static void vmclear_local_loaded_vmcss(void) > >> static void kvm_cpu_vmxoff(void) > >> { > >> asm volatile (__ex(ASM_VMX_VMXOFF) : : : "cc"); > >> + > >> + intel_pt_vmx(0); > >> } > > > > Yeah so the name intel_pt_vmx() is pretty information-free because it has no verb, > > only nouns - please name new functions descriptively to after what they do! > > I do agree that it can use a better name (and this is a second attempt > already). > > > Something like intel_pt_set_vmx_state() or so? > > Hmm how about intel_pt_handle_vmx()? Ideally, akin to the VMXON/VMXOFF insns, > this could be two functions (intel_pt_handle_vmx{on,off}()) if the global > namespace can take it. Sure, intel_pt_handle_vmx(0/1) sounds good too. I wouldn't split it into two functions ... Thanks, Ingo