[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b26dc0a4-048b-85c0-9d6c-ee9994f7db57@redhat.com>
Date: Thu, 8 Dec 2016 15:53:41 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Brijesh Singh <brijesh.singh@....com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: kvm@...r.kernel.org, thomas.lendacky@....com, rkrcmar@...hat.com,
joro@...tes.org, x86@...nel.org, linux-kernel@...r.kernel.org,
mingo@...hat.com, hpa@...or.com, bp@...e.de
Subject: Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of
page walk
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
Powered by blists - more mailing lists