[PATCH 6/5] KVM: MMU: Optimize is_last_gpte()

2012-09-12 Thread Avi Kivity
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 --- arch/x86/include/asm/kvm_host.h | 7 +++ arch/x86/kvm/mmu.c | 20 arc

Re: [PATCH 6/5] KVM: MMU: Optimize is_last_gpte()

2012-09-12 Thread Avi Kivity
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. -- error compiling committee.c: too many ar

Re: [PATCH 6/5] KVM: MMU: Optimize is_last_gpte()

2012-09-13 Thread Avi Kivity
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 tomor

Re: [PATCH 6/5] KVM: MMU: Optimize is_last_gpte()

2012-09-13 Thread Xiao Guangrong
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

Re: [PATCH 6/5] KVM: MMU: Optimize is_last_gpte()

2012-09-16 Thread Avi Kivity
On 09/13/2012 04:39 PM, Xiao Guangrong wrote: >> 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 { >> u6