Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Kai Huang
On 12/16/2015 04:48 PM, Xiao Guangrong wrote: On 12/16/2015 04:05 PM, Kai Huang wrote: On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 04:05 PM, Kai Huang wrote: On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Kai Huang
On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Kai Huang
On 12/16/2015 04:48 PM, Xiao Guangrong wrote: On 12/16/2015 04:05 PM, Kai Huang wrote: On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Xiao Guangrong
On 12/16/2015 04:05 PM, Kai Huang wrote: On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-16 Thread Kai Huang
On 12/15/2015 05:25 PM, Xiao Guangrong wrote: On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 04:47 PM, Kai Huang wrote: A further thinking is can we move it to mmu_need_write_protect? Passing can_unsync as parameter to kvm_unsync_pages sounds a little bit odd. + if (s->unsync) continue; WARN_ON(s->role.level != PT_PAGE_TABLE_LEVEL);

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Kai Huang
On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Kai Huang
On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 26

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Kai Huang
On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 04:47 PM, Kai Huang wrote: A further thinking is can we move it to mmu_need_write_protect? Passing can_unsync as parameter to kvm_unsync_pages sounds a little bit odd. + if (s->unsync) continue; WARN_ON(s->role.level != PT_PAGE_TABLE_LEVEL);

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Kai Huang
On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao Guangrong ---

Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-12-15 Thread Xiao Guangrong
On 12/15/2015 04:43 PM, Kai Huang wrote: On 12/01/2015 02:26 AM, Xiao Guangrong wrote: Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao

[PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-11-30 Thread Xiao Guangrong
Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 26 -- 1 file changed, 8 insertions(+),

[PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect

2015-11-30 Thread Xiao Guangrong
Now, all non-leaf shadow page are page tracked, if gfn is not tracked there is no non-leaf shadow page of gfn is existed, we can directly make the shadow page of gfn to unsync Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 26 -- 1