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

Signed-off-by: Zhenzhong Duan <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: "K. Y. Srinivasan" <[email protected]>
Cc: Haiyang Zhang <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
---
...snip
@@ -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

Reply via email to