Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751690AbdC1MGa (ORCPT ); Tue, 28 Mar 2017 08:06:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53295 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbdC1MG3 (ORCPT ); Tue, 28 Mar 2017 08:06:29 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 021EE2EF17B Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 021EE2EF17B Subject: Re: [PATCH v2] KVM: x86: cleanup the page tracking SRCU instance To: Xiao Guangrong , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1490694038-27270-1-git-send-email-pbonzini@redhat.com> Cc: gregkh@linuxfoundation.org, dvyukov@google.com, stable@vger.kernel.org From: Paolo Bonzini Message-ID: <8ff4d874-7bca-b4f8-6fdf-db415f06b84b@redhat.com> Date: Tue, 28 Mar 2017 14:06:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 28 Mar 2017 12:06:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 868 Lines: 32 On 28/03/2017 13:25, Xiao Guangrong wrote: > > > On 28/03/2017 5:40 PM, Paolo Bonzini wrote: > >> void kvm_page_track_init(struct kvm *kvm) >> { >> struct kvm_page_track_notifier_head *head; >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index 64697fe475c3..f2379673912a 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -8070,6 +8070,7 @@ void kvm_arch_sync_events(struct kvm *kvm) >> cancel_delayed_work_sync(&kvm->arch.kvmclock_update_work); >> kvm_free_all_assigned_devices(kvm); >> kvm_free_pit(kvm); >> + kvm_page_track_cleanup(kvm); >> } > > Moving it to kvm_arch_destroy_vm() is better as the init > function is called in kvm_arch_init_vm(). That's fine too, thanks!. Paolo > Otherwise it looks great to me: > Reviewed-by: Xiao Guangrong > > Thanks for the fix.