Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-21 Thread Xiao Guangrong
On 04/21/2013 01:18 AM, Marcelo Tosatti wrote: > On Thu, Apr 18, 2013 at 12:03:45PM +0800, Xiao Guangrong wrote: >> On 04/18/2013 08:08 AM, Marcelo Tosatti wrote: >>> On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and

Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-21 Thread Xiao Guangrong
On 04/21/2013 01:18 AM, Marcelo Tosatti wrote: On Thu, Apr 18, 2013 at 12:03:45PM +0800, Xiao Guangrong wrote: On 04/18/2013 08:08 AM, Marcelo Tosatti wrote: On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and rename

Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-20 Thread Marcelo Tosatti
On Thu, Apr 18, 2013 at 12:03:45PM +0800, Xiao Guangrong wrote: > On 04/18/2013 08:08 AM, Marcelo Tosatti wrote: > > On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: > >> Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and > >> rename kvm_zap_all to kvm_free_all which is

Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-20 Thread Marcelo Tosatti
On Thu, Apr 18, 2013 at 12:03:45PM +0800, Xiao Guangrong wrote: On 04/18/2013 08:08 AM, Marcelo Tosatti wrote: On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and rename kvm_zap_all to kvm_free_all which is used to

Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-17 Thread Xiao Guangrong
On 04/18/2013 08:08 AM, Marcelo Tosatti wrote: > On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: >> Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and >> rename kvm_zap_all to kvm_free_all which is used to free all >> memmory used by kvm mmu when vm is being destroyed,

Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-17 Thread Marcelo Tosatti
On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: > Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and > rename kvm_zap_all to kvm_free_all which is used to free all > memmory used by kvm mmu when vm is being destroyed, at this time, > no vcpu exists and mmu-notify has

Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-17 Thread Marcelo Tosatti
On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and rename kvm_zap_all to kvm_free_all which is used to free all memmory used by kvm mmu when vm is being destroyed, at this time, no vcpu exists and mmu-notify has been

Re: [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-17 Thread Xiao Guangrong
On 04/18/2013 08:08 AM, Marcelo Tosatti wrote: On Tue, Apr 16, 2013 at 02:32:53PM +0800, Xiao Guangrong wrote: Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and rename kvm_zap_all to kvm_free_all which is used to free all memmory used by kvm mmu when vm is being destroyed, at this

[PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-16 Thread Xiao Guangrong
Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and rename kvm_zap_all to kvm_free_all which is used to free all memmory used by kvm mmu when vm is being destroyed, at this time, no vcpu exists and mmu-notify has been unregistered, so we can free the shadow pages out of mmu-lock

[PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages

2013-04-16 Thread Xiao Guangrong
Use kvm_mmu_invalid_all_pages in kvm_arch_flush_shadow_all and rename kvm_zap_all to kvm_free_all which is used to free all memmory used by kvm mmu when vm is being destroyed, at this time, no vcpu exists and mmu-notify has been unregistered, so we can free the shadow pages out of mmu-lock