Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-20 Thread Avi Kivity
On 09/14/2012 12:59 PM, Xiao Guangrong wrote: > Wrap the common operations into these two functions > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c | 53 +++ > arch/x86/kvm/paging_tmpl.h | 16 + > 2 files changed, 39 in

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-19 Thread Xiao Guangrong
On 09/19/2012 07:43 AM, Marcelo Tosatti wrote: >>> - error pfn / mmio pfn / invalid pfn relation >>> >>> Have the meaning of this bits unified in a single function/helper, see >>> comment to patch 1 (perhaps you can further improve). >> >> Sorry, more detail? > > Should force the reader of the co

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-19 Thread Marcelo Tosatti
On Tue, Sep 18, 2012 at 04:15:32PM +0800, Xiao Guangrong wrote: > On 09/15/2012 11:25 PM, Marcelo Tosatti wrote: > > On Fri, Sep 14, 2012 at 05:59:06PM +0800, Xiao Guangrong wrote: > >> Wrap the common operations into these two functions > >> > >> Signed-off-by: Xiao Guangrong > > > > Why? I thin

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-18 Thread Xiao Guangrong
On 09/15/2012 11:25 PM, Marcelo Tosatti wrote: > On Fri, Sep 14, 2012 at 05:59:06PM +0800, Xiao Guangrong wrote: >> Wrap the common operations into these two functions >> >> Signed-off-by: Xiao Guangrong > > Why? I think people are used to > > spin_lock(lock) > sequence > spin_unlock(lock) Mar

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 05:59:06PM +0800, Xiao Guangrong wrote: > Wrap the common operations into these two functions > > Signed-off-by: Xiao Guangrong Why? I think people are used to spin_lock(lock) sequence spin_unlock(lock) So its easy to verify whether access to data structures are protec

[PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-14 Thread Xiao Guangrong
Wrap the common operations into these two functions Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 53 +++ arch/x86/kvm/paging_tmpl.h | 16 + 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/arch/x86/kvm/mmu.