From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH] perf/x86/intel/pt: Don't die on VMXON Date: Wed, 13 Apr 2016 12:53:31 +0200 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 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 To: Alexander Shishkin Return-path: Content-Disposition: inline In-Reply-To: <87r3e9x0hi.fsf@ashishki-desk.ger.corp.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.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