Thread (13 messages) 13 messages, 2 authors, 2019-10-03

Re: [PATCH v3 4/4] x86/hyperv: Mark "hv_nopvspin" parameter obsolete and map it to "nopvspin"

From: Zhenzhong Duan <hidden>
Date: 2019-10-03 11:22:54
Also in: kvm, lkml

On 2019/10/3 1:19, Sean Christopherson wrote:
On Mon, Sep 30, 2019 at 08:44:39PM +0800, Zhenzhong Duan wrote:
quoted
Includes asm/hypervisor.h in order to reference x86_hyper_type.

Signed-off-by: Zhenzhong Duan <redacted>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <redacted>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Thomas Gleixner <redacted>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
...snip
quoted
@@ -64,7 +63,7 @@ __visible bool hv_vcpu_is_preempted(int vcpu)
  
  void __init hv_init_spinlocks(void)
  {
-	if (!hv_pvspin || !apic ||
+	if (!pvspin || !apic ||
  	    !(ms_hyperv.hints & HV_X64_CLUSTER_IPI_RECOMMENDED) ||
  	    !(ms_hyperv.features & HV_X64_MSR_GUEST_IDLE_AVAILABLE)) {
  		pr_info("PV spinlocks disabled\n");
@@ -82,7 +81,9 @@ void __init hv_init_spinlocks(void)
  
  static __init int hv_parse_nopvspin(char *arg)
  {
-	hv_pvspin = false;
+	pr_notice("\"hv_nopvspin\" is deprecated, please use \"nopvspin\" instead\n");
+	if (x86_hyper_type == X86_HYPER_MS_HYPERV)
+		pvspin = false;
Personal preference would be to keep the hv_pvspin variable and add the
extra check in hv_init_spinlocks().
OK, will do that way. Thanks

Zhenzhong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help