From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v3 11/11] KVM: MMU: apply page track notifier Date: Tue, 23 Feb 2016 15:17:26 +0100 Message-ID: <56CC69F6.2000305@redhat.com> References: <1455449503-20993-1-git-send-email-guangrong.xiao@linux.intel.com> <1455449503-20993-12-git-send-email-guangrong.xiao@linux.intel.com> <56C702F9.3070309@redhat.com> <56CBE2C2.7020005@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kai.huang@linux.intel.com, jike.song@intel.com To: Xiao Guangrong Return-path: In-Reply-To: <56CBE2C2.7020005@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 23/02/2016 05:40, Xiao Guangrong wrote: >>> >>> @@ -7878,6 +7877,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm) >>> kfree(kvm->arch.vioapic); >>> kvm_free_vcpus(kvm); >>> kfree(rcu_dereference_check(kvm->arch.apic_map, 1)); >>> + kvm_mmu_uninit_vm(kvm); >> >> This function is not necessary, since the VM is disappearing anyway and >> the page tracker is not going to be called. > > I think it is still necessary, as we are using srcu to protect the > notifier, so > we should wait all the callers of notifier callbacks gone, i.e, > synchronize_srcu() is needed anyway. You're right. Paolo