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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1110052113370.18778@ionos>
Date:	Wed, 5 Oct 2011 21:20:54 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Fenghua Yu <fenghua.yu@...el.com>
cc:	Ingo Molnar <mingo@...e.hu>, H Peter Anvin <hpa@...or.com>,
	Zwane Mwaikambo <zwane@....linux.org.uk>,
	Tony Luck <tony.luck@...el.com>,
	Asit K Mallick <asit.k.mallick@...el.com>,
	Suresh B Siddha <suresh.b.siddha@...el.com>,
	Len Brown <lenb@...nel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/8] x86, topology.c: Enable CPU0 online/offline

On Wed, 5 Oct 2011, Fenghua Yu wrote:

> From: Fenghua Yu <fenghua.yu@...el.com>
> 
> Enable CPU0 online/offline by setting up its sysfs control file. By default,
> this feature is disabled. You can enabled it by bsp_hotplug kernel option.
> 
> Resume from hibernate, standby, or suspend needs CPU0 online. According to
> arch/x86/kernel/topology.c, some PCI quirks(??) need CPU0 online as well. Anyone
> knows which PCI quirks depends on CPU0 online?
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
> ---
>  Documentation/kernel-parameters.txt |    7 +++++++
>  arch/x86/kernel/topology.c          |   22 +++++++++++++++-------
>  2 files changed, 22 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 854ed5c..bf011ee 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -1805,6 +1805,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>  
>  	nox2apic	[X86-64,APIC] Do not enable x2APIC mode.
>  
> +	bsp_hotplug	[X86] BSP (aka CPU0) is hotpluggable.
> +			Suspend/resume depends on BSP. It's said some PCI
> +			quirks depend on BSP too. But not sure which quirks.

Right, not sure what breaks. Go ahead and watch your machine explode.

> +			If don't care the dependencies, you can turn on
> +			bsp_ hotplug. Suspend will fail if BSP is offlined and
> +			you need to online BSP before suspend/resume.

And you forgot poweroff and reboot, which have similar dependencies on
some machines. That whole low level ACPI stuff is sensitive.

> +
>  	nptcg=		[IA-64] Override max number of concurrent global TLB
>  			purges which is reported from either PAL_VM_SUMMARY or
>  			SAL PALO.
> diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
> index 8927486..ed2da5c 100644
> --- a/arch/x86/kernel/topology.c
> +++ b/arch/x86/kernel/topology.c
> @@ -34,18 +34,26 @@
>  static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);
>  
>  #ifdef CONFIG_HOTPLUG_CPU
> +
> +static int __init enable_bsp_hotplug(char *str)
> +{
> +	bsp_hotpluggable = 1;

And that variable is defined where? I know where in the following
patch, so it's clear that series was neither compiled step per step
nor booted.

> +	 * Suspend/resume depends on BSP. Certain PCI quirks (which PCI
> +	 * quirks??) require not to enable hotplug control for all CPU's.

Again, you dammit better make shure which quirks break when cpu0 is
offlined.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ