From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934067AbcK2SXe (ORCPT ); Tue, 29 Nov 2016 13:23:34 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:52066 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933978AbcK2SXW (ORCPT ); Tue, 29 Nov 2016 13:23:22 -0500 Date: Tue, 29 Nov 2016 19:20:38 +0100 (CET) From: Thomas Gleixner To: Brijesh Singh cc: kvm@vger.kernel.org, thomas.lendacky@amd.com, rkrcmar@redhat.com, joro@8bytes.org, x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com, pbonzini@redhat.com, bp@suse.de Subject: Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk In-Reply-To: <148044249174.29544.4194514184644021170.stgit@brijesh-build-machine> Message-ID: References: <148044248179.29544.16863706762469812354.stgit@brijesh-build-machine> <148044249174.29544.4194514184644021170.stgit@brijesh-build-machine> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Nov 2016, Brijesh Singh wrote: > --- a/arch/x86/kvm/emulate.c > +++ b/arch/x86/kvm/emulate.c > @@ -5483,3 +5483,11 @@ void emulator_writeback_register_cache(struct x86_emulate_ctxt *ctxt) > { > writeback_registers(ctxt); > } > + > +bool emulator_is_string_op(struct x86_emulate_ctxt *ctxt) > +{ > + if (ctxt->d & String) > + return true; > + > + return false; > +} Do we really need a full function call for this simple thing? Just because this horrible CamelCase constant is in emulate.c? What's wrong with moving that thing into a header and make it a trivial inline: #define INS_STRING (1 << 13) static inline bool emulator_is_string_op(struct x86_emulate_ctxt *ctxt) { return ctxt->d & INS_STRING; } Hmm? tglx