Re: [PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-13 Thread Marcelo Tosatti
On Thu, Dec 13, 2012 at 03:23:26AM +0800, Xiao Guangrong wrote: > On 12/12/2012 08:57 AM, Marcelo Tosatti wrote: > > On Mon, Dec 10, 2012 at 05:13:03PM +0800, Xiao Guangrong wrote: > >> We have two issues in current code: > >> - if target gfn is used as its page table, guest will refault then kvm

Re: [PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-13 Thread Marcelo Tosatti
On Thu, Dec 13, 2012 at 03:23:26AM +0800, Xiao Guangrong wrote: On 12/12/2012 08:57 AM, Marcelo Tosatti wrote: On Mon, Dec 10, 2012 at 05:13:03PM +0800, Xiao Guangrong wrote: We have two issues in current code: - if target gfn is used as its page table, guest will refault then kvm will

Re: [PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-12 Thread Xiao Guangrong
On 12/12/2012 08:57 AM, Marcelo Tosatti wrote: > On Mon, Dec 10, 2012 at 05:13:03PM +0800, Xiao Guangrong wrote: >> We have two issues in current code: >> - if target gfn is used as its page table, guest will refault then kvm will >> use >> small page size to map it. We need two #PF to fix its

Re: [PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-12 Thread Xiao Guangrong
On 12/12/2012 08:57 AM, Marcelo Tosatti wrote: On Mon, Dec 10, 2012 at 05:13:03PM +0800, Xiao Guangrong wrote: We have two issues in current code: - if target gfn is used as its page table, guest will refault then kvm will use small page size to map it. We need two #PF to fix its shadow

Re: [PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-11 Thread Marcelo Tosatti
On Mon, Dec 10, 2012 at 05:13:03PM +0800, Xiao Guangrong wrote: > We have two issues in current code: > - if target gfn is used as its page table, guest will refault then kvm will > use > small page size to map it. We need two #PF to fix its shadow page table > > - sometimes, say a exception

Re: [PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-11 Thread Marcelo Tosatti
On Mon, Dec 10, 2012 at 05:13:03PM +0800, Xiao Guangrong wrote: We have two issues in current code: - if target gfn is used as its page table, guest will refault then kvm will use small page size to map it. We need two #PF to fix its shadow page table - sometimes, say a exception is

[PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-10 Thread Xiao Guangrong
We have two issues in current code: - if target gfn is used as its page table, guest will refault then kvm will use small page size to map it. We need two #PF to fix its shadow page table - sometimes, say a exception is triggered during vm-exit caused by #PF (see handle_exception() in vmx.c),

[PATCH v2 2/5] KVM: MMU: adjust page size early if gfn used as page table

2012-12-10 Thread Xiao Guangrong
We have two issues in current code: - if target gfn is used as its page table, guest will refault then kvm will use small page size to map it. We need two #PF to fix its shadow page table - sometimes, say a exception is triggered during vm-exit caused by #PF (see handle_exception() in vmx.c),