From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932366AbcLHOxr (ORCPT ); Thu, 8 Dec 2016 09:53:47 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35948 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbcLHOxp (ORCPT ); Thu, 8 Dec 2016 09:53:45 -0500 Subject: Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk To: Brijesh Singh , Thomas Gleixner References: <148044248179.29544.16863706762469812354.stgit@brijesh-build-machine> <148044249174.29544.4194514184644021170.stgit@brijesh-build-machine> 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, bp@suse.de From: Paolo Bonzini Message-ID: Date: Thu, 8 Dec 2016 15:53:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/11/2016 20:38, Brijesh Singh wrote: > > > On 11/29/2016 12:20 PM, Thomas Gleixner wrote: >> 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? > > One of the recommendation from previous review feedback was to move the > check inside emulator.c. I am fine with inlining it into kvm_emulate.h > > Hi Paolo, > > Do you want me to spin a new version ? No, it's not that much of a fast path, so it wouldn't change anything in practice. Paolo