From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH] arm64: KVM: unregister notifiers in hyp mode teardown path Date: Mon, 4 Apr 2016 15:33:41 +0100 Message-ID: <57027B45.7080604@arm.com> References: <1459777611-22592-1-git-send-email-sudeep.holla@arm.com> <5702726D.7000505@arm.com> <570278A4.9060600@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7D0634011D for ; Mon, 4 Apr 2016 10:32:29 -0400 (EDT) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VXf6X9IdBJ-I for ; Mon, 4 Apr 2016 10:32:28 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3F022400E9 for ; Mon, 4 Apr 2016 10:32:27 -0400 (EDT) In-Reply-To: <570278A4.9060600@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Sudeep Holla , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On 04/04/16 15:22, Sudeep Holla wrote: > > > On 04/04/16 14:55, Marc Zyngier wrote: >> Hi Sudeep, >> >> On 04/04/16 14:46, Sudeep Holla wrote: > > [...] > >>> @@ -1270,12 +1279,7 @@ static int init_hyp_mode(void) >>> free_boot_hyp_pgd(); >>> #endif >>> >>> - cpu_notifier_register_begin(); >>> - >>> - err = __register_cpu_notifier(&hyp_init_cpu_nb); >>> - >>> - cpu_notifier_register_done(); >>> - >>> + err = register_cpu_notifier(&hyp_init_cpu_nb); >> >> We went from something like this to the cpu_notifier_register_begin/end >> with 8146875de ("arm, kvm: Fix CPU hotplug callback registration"). >> >> What makes it more acceptable now? >> > > Correct, but in the initial code even init_hyp_mode was protected under > cpu_notifier_register_begin, but IIUC recent re-org eliminated the need > for that and the above code exactly resembles what register_cpu_notifier > does. > > If that's not the case then we need to move cpu_notifier_register_begin > further up and retain __register_cpu_notifier > > I mainly changed it to keep it consistent with unregister call. Right, thanks for the explanation. So FWIW: Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...