Re: [PATCH] KVM: MMU: optimize for set_spte

2012-12-05 Thread Gleb Natapov
On Tue, Dec 04, 2012 at 07:17:11AM +0800, Xiao Guangrong wrote: > There are two cases we need to adjust page size in set_spte: > 1): the one is other vcpu creates new sp in the window between mapping_level() > and acquiring mmu-lock. > 2): the another case is the new sp is created by itself

Re: [PATCH] KVM: MMU: optimize for set_spte

2012-12-05 Thread Xiao Guangrong
On 12/06/2012 05:09 AM, Marcelo Tosatti wrote: > On Tue, Dec 04, 2012 at 07:17:11AM +0800, Xiao Guangrong wrote: >> There are two cases we need to adjust page size in set_spte: >> 1): the one is other vcpu creates new sp in the window between >> mapping_level() >> and acquiring mmu-lock. >>

Re: [PATCH] KVM: MMU: optimize for set_spte

2012-12-05 Thread Marcelo Tosatti
On Tue, Dec 04, 2012 at 07:17:11AM +0800, Xiao Guangrong wrote: > There are two cases we need to adjust page size in set_spte: > 1): the one is other vcpu creates new sp in the window between mapping_level() > and acquiring mmu-lock. > 2): the another case is the new sp is created by itself

Re: [PATCH] KVM: MMU: optimize for set_spte

2012-12-05 Thread Marcelo Tosatti
On Tue, Dec 04, 2012 at 07:17:11AM +0800, Xiao Guangrong wrote: There are two cases we need to adjust page size in set_spte: 1): the one is other vcpu creates new sp in the window between mapping_level() and acquiring mmu-lock. 2): the another case is the new sp is created by itself

Re: [PATCH] KVM: MMU: optimize for set_spte

2012-12-05 Thread Xiao Guangrong
On 12/06/2012 05:09 AM, Marcelo Tosatti wrote: On Tue, Dec 04, 2012 at 07:17:11AM +0800, Xiao Guangrong wrote: There are two cases we need to adjust page size in set_spte: 1): the one is other vcpu creates new sp in the window between mapping_level() and acquiring mmu-lock. 2): the

Re: [PATCH] KVM: MMU: optimize for set_spte

2012-12-05 Thread Gleb Natapov
On Tue, Dec 04, 2012 at 07:17:11AM +0800, Xiao Guangrong wrote: There are two cases we need to adjust page size in set_spte: 1): the one is other vcpu creates new sp in the window between mapping_level() and acquiring mmu-lock. 2): the another case is the new sp is created by itself

[PATCH] KVM: MMU: optimize for set_spte

2012-12-03 Thread Xiao Guangrong
There are two cases we need to adjust page size in set_spte: 1): the one is other vcpu creates new sp in the window between mapping_level() and acquiring mmu-lock. 2): the another case is the new sp is created by itself (page-fault path) when guest uses the target gfn as its page table.

[PATCH] KVM: MMU: optimize for set_spte

2012-12-03 Thread Xiao Guangrong
There are two cases we need to adjust page size in set_spte: 1): the one is other vcpu creates new sp in the window between mapping_level() and acquiring mmu-lock. 2): the another case is the new sp is created by itself (page-fault path) when guest uses the target gfn as its page table.