Re: KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-22 Thread Marcelo Tosatti
On Fri, Mar 22, 2013 at 11:00:28AM +0800, Xiao Guangrong wrote: > On 03/21/2013 10:29 PM, Marcelo Tosatti wrote: > > On Thu, Mar 21, 2013 at 01:41:59PM +0800, Xiao Guangrong wrote: > >> On 03/21/2013 04:14 AM, Marcelo Tosatti wrote: > >>> > >>> kvm_mmu_calculate_mmu_pages numbers, > >>> > >>> maxi

Re: KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-21 Thread Xiao Guangrong
On 03/21/2013 10:29 PM, Marcelo Tosatti wrote: > On Thu, Mar 21, 2013 at 01:41:59PM +0800, Xiao Guangrong wrote: >> On 03/21/2013 04:14 AM, Marcelo Tosatti wrote: >>> >>> kvm_mmu_calculate_mmu_pages numbers, >>> >>> maximum number of shadow pages = 2% of mapped guest pages >>> >>> Does not make se

Re: KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-21 Thread Marcelo Tosatti
On Thu, Mar 21, 2013 at 01:41:59PM +0800, Xiao Guangrong wrote: > On 03/21/2013 04:14 AM, Marcelo Tosatti wrote: > > > > kvm_mmu_calculate_mmu_pages numbers, > > > > maximum number of shadow pages = 2% of mapped guest pages > > > > Does not make sense for TDP guests where mapping all of guest >

Re: KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-20 Thread Xiao Guangrong
On 03/21/2013 04:14 AM, Marcelo Tosatti wrote: > > kvm_mmu_calculate_mmu_pages numbers, > > maximum number of shadow pages = 2% of mapped guest pages > > Does not make sense for TDP guests where mapping all of guest > memory with 4k pages cannot exceed "mapped guest pages / 512" > (not counting

KVM: MMU: improve n_max_mmu_pages calculation with TDP

2013-03-20 Thread Marcelo Tosatti
kvm_mmu_calculate_mmu_pages numbers, maximum number of shadow pages = 2% of mapped guest pages Does not make sense for TDP guests where mapping all of guest memory with 4k pages cannot exceed "mapped guest pages / 512" (not counting root pages). Allow that maximum for TDP, forcing the guest to