All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Cc: Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [PATCH] arm64: KVM: unregister notifiers in hyp mode teardown path
Date: Mon, 4 Apr 2016 15:22:28 +0100	[thread overview]
Message-ID: <570278A4.9060600@arm.com> (raw)
In-Reply-To: <5702726D.7000505@arm.com>



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.

-- 
Regards,
Sudeep

WARNING: multiple messages have this Message-ID (diff)
From: sudeep.holla@arm.com (Sudeep Holla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: KVM: unregister notifiers in hyp mode teardown path
Date: Mon, 4 Apr 2016 15:22:28 +0100	[thread overview]
Message-ID: <570278A4.9060600@arm.com> (raw)
In-Reply-To: <5702726D.7000505@arm.com>



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.

-- 
Regards,
Sudeep

  reply	other threads:[~2016-04-04 14:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 13:46 [PATCH] arm64: KVM: unregister notifiers in hyp mode teardown path Sudeep Holla
2016-04-04 13:46 ` Sudeep Holla
2016-04-04 13:55 ` Marc Zyngier
2016-04-04 13:55   ` Marc Zyngier
2016-04-04 14:22   ` Sudeep Holla [this message]
2016-04-04 14:22     ` Sudeep Holla
2016-04-04 14:33     ` Marc Zyngier
2016-04-04 14:33       ` Marc Zyngier
2016-04-06 11:52 ` Christoffer Dall
2016-04-06 11:52   ` Christoffer Dall
2016-04-06 13:09   ` Sudeep Holla
2016-04-06 13:09     ` Sudeep Holla
2016-04-06 13:15     ` Christoffer Dall
2016-04-06 13:15       ` Christoffer Dall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570278A4.9060600@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.