x86/xen: remove deprecated xen_nopvspin boot parameter
Subsystems (4)
Juergen Gross
maintainerPATCH 1/1 x86/xen: remove deprecated xen_nopvspin boot parameter
The xen_nopvspin boot parameter is deprecated since 2019. nopvspin can be used instead.
Remove the xen_nopvspin boot parameter and replace the xen_pvspin variable use cases with nopvspin.
This requires to move the nopvspin variable out of the .initdata section, as it needs to be accessed for cpuhotplug, too.
--- .../admin-guide/kernel-parameters.txt | 5 ----- arch/x86/xen/spinlock.c | 20 +++++-------------- kernel/locking/qspinlock.c | 2 +- 3 files changed, 6 insertions(+), 21 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +0 -5
@@ -7439,11 +7439,6 @@ access functions when running as Xen PV guest. The default value is controlled by CONFIG_XEN_PV_MSR_SAFE. - xen_nopvspin [X86,XEN,EARLY] - Disables the qspinlock slowpath using Xen PV optimizations. - This parameter is obsoleted by "nopvspin" parameter, which - has equivalent effect for XEN platform. - xen_nopv [X86] Disables the PV optimizations forcing the HVM guest to run as generic HVM guest with no PV drivers.
arch/x86/xen/spinlock.c +5 -15
@@ -18,7 +18,6 @@ static DEFINE_PER_CPU(int, lock_kicker_irq) = -1; static DEFINE_PER_CPU(char *, irq_name); static DEFINE_PER_CPU(atomic_t, xen_qlock_wait_nest); -static bool xen_pvspin = true;static void xen_qlock_kick (int cpu) {
@@ -68,7 +67,7 @@ void xen_init_lock_cpu(int cpu)int irq;char *name; -if (!xen_pvspin) +if (nopvspin)return ; WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exists on IRQ%d!\n",
@@ -95,7 +94,7 @@ void xen_uninit_lock_cpu(int cpu) {int irq; -if (!xen_pvspin) +if (nopvspin)return ;kfree (per_cpu (irq_name, cpu));
@@ -125,10 +124,10 @@ PV_CALLEE_SAVE_REGS_THUNK(xen_vcpu_stolen);void __init xen_init_spinlocks (void ) {/* Don't need to use pvqspinlock code if there is only 1 vCPU. */ -if (num_possible_cpus () ==1 || nopvspin) - xen_pvspin = false; +if (num_possible_cpus () ==1 ) + nopvspin = true; -if (!xen_pvspin) { +if (nopvspin) {printk (KERN_DEBUG "xen: PV spinlocks disabled\n" );static_branch_disable (&virt_spin_lock_key);return ;
@@ -143,12 +142,3 @@ void __init xen_init_spinlocks(void) pv_ops.lock.kick = xen_qlock_kick; pv_ops.lock.vcpu_is_preempted =PV_CALLEE_SAVE (xen_vcpu_stolen); } - -static __init int xen_parse_nopvspin (char *arg) -{ -pr_notice ("\"xen_nopvspin\" is deprecated, please use \"nopvspin\" instead\n" ); - xen_pvspin = false; -return 0 ; -} -early_param ("xen_nopvspin" , xen_parse_nopvspin); -
kernel/locking/qspinlock.c +1 -1
@@ -583,7 +583,7 @@ EXPORT_SYMBOL(queued_spin_lock_slowpath);#include "qspinlock_paravirt.h" #include "qspinlock.c" -bool nopvspin__initdata ; +bool nopvspin;static __init int parse_nopvspin (char *arg) { nopvspin = true;
Signature · 1 line
2.43.0
Quoted 10 lines · Juergen Gross
The
xen_nopvspinboot parameter is deprecated since 2019. nopvspin can be used instead.Remove the
xen_nopvspinboot parameter and replace thexen_pvspinvariable use cases with nopvspin.This requires to move the nopvspin variable out of the .initdata section, as it needs to be accessed for cpuhotplug, too.
Signed-off-by Juergen Gross <[email protected]>
Quoted 94 lines · Juergen Gross
The
xen_nopvspinboot parameter is deprecated since 2019. nopvspin can be used instead.Remove the
xen_nopvspinboot parameter and replace thexen_pvspinvariable use cases with nopvspin.This requires to move the nopvspin variable out of the .initdata section, as it needs to be accessed for cpuhotplug, too.
Signed-off-by Juergen Gross <[email protected]>--- .../admin-guide/kernel-parameters.txt | 5 ----- arch/x86/xen/spinlock.c | 20 +++++-------------- kernel/locking/qspinlock.c | 2 +- 3 files changed, 6 insertions(+), 21 deletions(-)Documentation/admin-guide/kernel-parameters.txt +0
-5@@ -7439,11 +7439,6 @@ access functions when running as Xen PV guest. The default value is controlled by CONFIG_XEN_PV_MSR_SAFE. - xen_nopvspin [X86,XEN,EARLY] - Disables the qspinlock slowpath using Xen PV optimizations. - This parameter is obsoleted by "nopvspin" parameter, which - has equivalent effect for XEN platform. - xen_nopv [X86] Disables the PV optimizations forcing the HVM guest to run as generic HVM guest with no PV drivers.arch/x86/xen/spinlock.c +5
-15@@ -18,7 +18,6 @@ static DEFINE_PER_CPU(int, lock_kicker_irq) = -1; static DEFINE_PER_CPU(char *, irq_name); static DEFINE_PER_CPU(atomic_t, xen_qlock_wait_nest); -static bool xen_pvspin = true;static void xen_qlock_kick (int cpu) {@@ -68,7 +67,7 @@ void xen_init_lock_cpu(int cpu)int irq;char *name; -if (!xen_pvspin) +if (nopvspin)return ; WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exists on IRQ%d!\n",@@ -95,7 +94,7 @@ void xen_uninit_lock_cpu(int cpu) {int irq; -if (!xen_pvspin) +if (nopvspin)return ;kfree (per_cpu (irq_name, cpu));@@ -125,10 +124,10 @@ PV_CALLEE_SAVE_REGS_THUNK(xen_vcpu_stolen);void __init xen_init_spinlocks (void ) {/* Don't need to use pvqspinlock code if there is only 1 vCPU. */ -if (num_possible_cpus () ==1 || nopvspin) - xen_pvspin = false; +if (num_possible_cpus () ==1 ) + nopvspin = true; -if (!xen_pvspin) { +if (nopvspin) {printk (KERN_DEBUG "xen: PV spinlocks disabled\n" );static_branch_disable (&virt_spin_lock_key);return ;@@ -143,12 +142,3 @@ void __init xen_init_spinlocks(void) pv_ops.lock.kick = xen_qlock_kick; pv_ops.lock.vcpu_is_preempted =PV_CALLEE_SAVE (xen_vcpu_stolen); } - -static __init int xen_parse_nopvspin (char *arg) -{ -pr_notice ("\"xen_nopvspin\" is deprecated, please use \"nopvspin\" instead\n" ); - xen_pvspin = false; -return 0 ; -} -early_param ("xen_nopvspin" , xen_parse_nopvspin); -kernel/locking/qspinlock.c +0
-0
kernel/locking/qspinlock.c EXPORT_SYMBOL(queued_spin_lock_slowpath); · line 589
Quoted 8 lines
kernel/locking/qspinlock.c +1
-1@@ -583,7 +583,7 @@ EXPORT_SYMBOL(queued_spin_lock_slowpath);#include "qspinlock_paravirt.h" #include "qspinlock.c" -bool nopvspin__initdata ; +bool nopvspin;static __init int parse_nopvspin (char *arg) { nopvspin = true;