Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 9fe6a8c

Browse files
committed
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. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Message-ID: <20240710110139.22300-1-jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent bcea31e commit 9fe6a8c

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7439,11 +7439,6 @@
74397439
access functions when running as Xen PV guest. The
74407440
default value is controlled by CONFIG_XEN_PV_MSR_SAFE.
74417441

7442-
xen_nopvspin [X86,XEN,EARLY]
7443-
Disables the qspinlock slowpath using Xen PV optimizations.
7444-
This parameter is obsoleted by "nopvspin" parameter, which
7445-
has equivalent effect for XEN platform.
7446-
74477442
xen_nopv [X86]
74487443
Disables the PV optimizations forcing the HVM guest to
74497444
run as generic HVM guest with no PV drivers.

arch/x86/xen/spinlock.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
static DEFINE_PER_CPU(int, lock_kicker_irq) = -1;
1919
static DEFINE_PER_CPU(char *, irq_name);
2020
static DEFINE_PER_CPU(atomic_t, xen_qlock_wait_nest);
21-
static bool xen_pvspin = true;
2221

2322
static void xen_qlock_kick(int cpu)
2423
{
@@ -68,7 +67,7 @@ void xen_init_lock_cpu(int cpu)
6867
int irq;
6968
char *name;
7069

71-
if (!xen_pvspin)
70+
if (nopvspin)
7271
return;
7372

7473
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)
9594
{
9695
int irq;
9796

98-
if (!xen_pvspin)
97+
if (nopvspin)
9998
return;
10099

101100
kfree(per_cpu(irq_name, cpu));
@@ -125,10 +124,10 @@ PV_CALLEE_SAVE_REGS_THUNK(xen_vcpu_stolen);
125124
void __init xen_init_spinlocks(void)
126125
{
127126
/* Don't need to use pvqspinlock code if there is only 1 vCPU. */
128-
if (num_possible_cpus() == 1 || nopvspin)
129-
xen_pvspin = false;
127+
if (num_possible_cpus() == 1)
128+
nopvspin = true;
130129

131-
if (!xen_pvspin) {
130+
if (nopvspin) {
132131
printk(KERN_DEBUG "xen: PV spinlocks disabled\n");
133132
static_branch_disable(&virt_spin_lock_key);
134133
return;
@@ -143,12 +142,3 @@ void __init xen_init_spinlocks(void)
143142
pv_ops.lock.kick = xen_qlock_kick;
144143
pv_ops.lock.vcpu_is_preempted = PV_CALLEE_SAVE(xen_vcpu_stolen);
145144
}
146-
147-
static __init int xen_parse_nopvspin(char *arg)
148-
{
149-
pr_notice("\"xen_nopvspin\" is deprecated, please use \"nopvspin\" instead\n");
150-
xen_pvspin = false;
151-
return 0;
152-
}
153-
early_param("xen_nopvspin", xen_parse_nopvspin);
154-

kernel/locking/qspinlock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ EXPORT_SYMBOL(queued_spin_lock_slowpath);
583583
#include "qspinlock_paravirt.h"
584584
#include "qspinlock.c"
585585

586-
bool nopvspin __initdata;
586+
bool nopvspin;
587587
static __init int parse_nopvspin(char *arg)
588588
{
589589
nopvspin = true;

0 commit comments

Comments
 (0)