Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1532632 > unrolled thread

Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk

Started byThomas Gleixner <tglx@linutronix.de>
First post2016-11-29 19:30 +0100
Last post2016-12-08 16:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of  page walk Thomas Gleixner <tglx@linutronix.de> - 2016-11-29 19:30 +0100
    Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of  page walk Paolo Bonzini <pbonzini@redhat.com> - 2016-12-08 16:00 +0100

#1532632 — Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk

FromThomas Gleixner <tglx@linutronix.de>
Date2016-11-29 19:30 +0100
SubjectRe: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk
Message-ID<sIVke-3Ce-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1538596

FromPaolo Bonzini <pbonzini@redhat.com>
Date2016-12-08 16:00 +0100
Message-ID<sM8kW-7mt-19@gated-at.bofh.it>
In reply to#1532632

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web