lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1abe11be-b6d7-4d64-a341-e41a59fdc8c8@redhat.com>
Date: Sun, 14 Jul 2024 17:26:20 -0400
From: Waiman Long <longman@...hat.com>
To: Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org,
 x86@...nel.org, linux-doc@...r.kernel.org
Cc: Jonathan Corbet <corbet@....net>,
 Boris Ostrovsky <boris.ostrovsky@...cle.com>,
 Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 "H. Peter Anvin" <hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>,
 Will Deacon <will@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
 xen-devel@...ts.xenproject.org
Subject: Re: [PATCH] x86/xen: remove deprecated xen_nopvspin boot parameter

On 7/10/24 07:01, Juergen Gross wrote:
> 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@...e.com>
> ---
>   .../admin-guide/kernel-parameters.txt         |  5 -----
>   arch/x86/xen/spinlock.c                       | 20 +++++--------------
>   kernel/locking/qspinlock.c                    |  2 +-
>   3 files changed, 6 insertions(+), 21 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index b33d048e01d8..2074ba03f2e3 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -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.
> diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
> index 5c6fc16e4b92..8e4efe0fb6f9 100644
> --- a/arch/x86/xen/spinlock.c
> +++ b/arch/x86/xen/spinlock.c
> @@ -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);
> -
> diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> index 1df5fef8a656..7d96bed718e4 100644
> --- a/kernel/locking/qspinlock.c
> +++ b/kernel/locking/qspinlock.c
> @@ -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;
Acked-by: Waiman Long <longman@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ