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-next>] [day] [month] [year] [list]
Message-Id: <20200304155648.11501-1-psampat@linux.ibm.com>
Date:   Wed,  4 Mar 2020 21:26:48 +0530
From:   Pratik Rajesh Sampat <psampat@...ux.ibm.com>
To:     skiboot@...ts.ozlabs.org, oohall@...il.com, mikey@...ling.org,
        npiggin@...il.com, vaidy@...ux.ibm.com, ego@...ux.vnet.ibm.com,
        linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org,
        mpe@...erman.id.au, psampat@...ux.ibm.com,
        pratik.r.sampat@...il.com
Subject: [RFC] Support stop state version quirk and firmware enabled stop

A concept patch in Skiboot to illustrate the case wherein handling of
stop states for different DD versions of a CPU can be achieved by a
simple modification in the list of cpu_features.
As an example idle-stop1 is defined which uses P9_CPU_DD1 to define the
cpu feature.

Along with that, an implementation is being worked upon the LE OPAL
series which helps OPAL handle the stop state entry and exit.

This patch advertises this capability of the firmware which can be
availed if the quirk-version-setting is not cognizable.

The firmware-enabled stop is being worked by Abhishek Goel
<huntbag@...ux.vnet.ibm.com> building upon the LE OPAL series.

Signed-off-by: Pratik Rajesh Sampat <psampat@...ux.ibm.com>
---
 core/cpufeatures.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/core/cpufeatures.c b/core/cpufeatures.c
index ec30c975..b9875e7b 100644
--- a/core/cpufeatures.c
+++ b/core/cpufeatures.c
@@ -510,6 +510,25 @@ static const struct cpu_feature cpu_features_table[] = {
 	-1, -1, -1,
 	NULL, },
 
+	/*
+	 * QUIRK for ISAv3.0B stop idle instructions and registers
+	 * Helps us determine if there are any quirks
+	 * XXX: Same of idle-stop
+	 */
+	{ "idle-stop-v1",
+	CPU_P9_DD1,
+	ISA_V3_0B, USABLE_HV|USABLE_OS,
+	HV_CUSTOM, OS_CUSTOM,
+	-1, -1, -1,
+	NULL, },
+
+	{ "firmware-stop-supported",
+	CPU_P9,
+	ISA_V3_0B, USABLE_HV|USABLE_OS,
+	HV_CUSTOM, OS_CUSTOM,
+	-1, -1, -1,
+	NULL, },
+
 	/*
 	 * ISAv3.0B Hypervisor Virtualization Interrupt
 	 * Also associated system registers, LPCR EE, HEIC, HVICE,
@@ -883,6 +902,9 @@ static void add_cpufeatures(struct dt_node *cpus,
 		const struct cpu_feature *f = &cpu_features_table[i];
 
 		if (f->cpus_supported & cpu_feature_cpu) {
+			if (!strcmp(f->name, "firmware-stop-supported") &&
+			    HAVE_BIG_ENDIAN)
+				continue;
 			DBG("  '%s'\n", f->name);
 			add_cpu_feature_nodeps(features, f);
 		}
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ