All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 6/5] KVM: MMU: Optimize is_last_gpte()
Date: Thu, 13 Sep 2012 21:39:17 +0800	[thread overview]
Message-ID: <5051E205.5090400@linux.vnet.ibm.com> (raw)
In-Reply-To: <5051ABCA.8080300@redhat.com>

On 09/13/2012 05:47 PM, Avi Kivity wrote:
> On 09/12/2012 09:03 PM, Avi Kivity wrote:
>> On 09/12/2012 08:49 PM, Avi Kivity wrote:
>>> Instead of branchy code depending on level, gpte.ps, and mmu configuration,
>>> prepare everything in a bitmap during mode changes and look it up during
>>> runtime.
>>
>> 6/5 is buggy, sorry, will update it tomorrow.
>>
>>
> 
> --------8<----------8<--------------
> 
> From: Avi Kivity <avi@redhat.com>
> Date: Wed, 12 Sep 2012 20:46:56 +0300
> Subject: [PATCH v2 6/5] KVM: MMU: Optimize is_last_gpte()
> 
> Instead of branchy code depending on level, gpte.ps, and mmu configuration,
> prepare everything in a bitmap during mode changes and look it up during
> runtime.
> 
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
> 
> v2: rearrange bitmap (one less shift)
>     avoid stomping on local variable
>     fix index calculation
>     move check back to a function
> 
>  arch/x86/include/asm/kvm_host.h |  7 +++++++
>  arch/x86/kvm/mmu.c              | 31 +++++++++++++++++++++++++++++++
>  arch/x86/kvm/mmu.h              |  3 ++-
>  arch/x86/kvm/paging_tmpl.h      | 22 +---------------------
>  4 files changed, 41 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 3318bde..f9a48cf 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -298,6 +298,13 @@ struct kvm_mmu {
>  	u64 *lm_root;
>  	u64 rsvd_bits_mask[2][4];
> 
> +	/*
> +	 * Bitmap: bit set = last pte in walk
> +	 * index[0]: pte.ps
> +	 * index[1:2]: level
> +	 */

Opposite? index[2]: pte.pse?

Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>



  reply	other threads:[~2012-09-13 13:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 14:29 [PATCH 0/5] Optimize page table walk Avi Kivity
2012-09-12 14:29 ` [PATCH 1/5] KVM: MMU: Push clean gpte write protection out of gpte_access() Avi Kivity
2012-09-13 11:29   ` Xiao Guangrong
2012-09-12 14:29 ` [PATCH 2/5] KVM: MMU: Optimize gpte_access() slightly Avi Kivity
2012-09-13 11:36   ` Xiao Guangrong
2012-09-12 14:29 ` [PATCH 3/5] KVM: MMU: Move gpte_access() out of paging_tmpl.h Avi Kivity
2012-09-13 11:48   ` Xiao Guangrong
2012-09-13 11:50     ` Avi Kivity
2012-09-12 14:29 ` [PATCH 4/5] KVM: MMU: Optimize pte permission checks Avi Kivity
2012-09-13 12:09   ` Xiao Guangrong
2012-09-13 12:15     ` Avi Kivity
2012-09-13 12:41   ` Xiao Guangrong
2012-09-13 13:35     ` Avi Kivity
2012-09-12 14:29 ` [PATCH 5/5] KVM: MMU: Simplify walk_addr_generic() loop Avi Kivity
2012-09-12 17:49 ` [PATCH 6/5] KVM: MMU: Optimize is_last_gpte() Avi Kivity
2012-09-12 18:03   ` Avi Kivity
2012-09-13  9:47     ` Avi Kivity
2012-09-13 13:39       ` Xiao Guangrong [this message]
2012-09-16 11:53         ` Avi Kivity
2012-09-12 22:20 ` [PATCH 0/5] Optimize page table walk Marcelo Tosatti
2012-09-13  8:25   ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5051E205.5090400@linux.vnet.ibm.com \
    --to=xiaoguangrong@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.