Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-07-21 10:23:21 +0200
committerJiri Slaby <jslaby@suse.cz>2019-07-21 10:23:27 +0200
commit8686882d8c22e817593cc5120a5af970712a130c (patch)
tree099cb0ca268c9fd2ec74e62fb7278fc2d72476c3
parentaa5301f86a389e1657ee91fdb587575c867bd000 (diff)
s390/ipl: Fix detection of has_secure attribute (bnc#1012628).
-rw-r--r--patches.kernel.org/5.2.2-014-s390-ipl-Fix-detection-of-has_secure-attribute.patch73
-rw-r--r--series.conf1
2 files changed, 74 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.2-014-s390-ipl-Fix-detection-of-has_secure-attribute.patch b/patches.kernel.org/5.2.2-014-s390-ipl-Fix-detection-of-has_secure-attribute.patch
new file mode 100644
index 0000000000..395ff43f79
--- /dev/null
+++ b/patches.kernel.org/5.2.2-014-s390-ipl-Fix-detection-of-has_secure-attribute.patch
@@ -0,0 +1,73 @@
+From: Philipp Rudo <prudo@linux.ibm.com>
+Date: Fri, 28 Jun 2019 17:38:05 +0200
+Subject: [PATCH] s390/ipl: Fix detection of has_secure attribute
+References: bnc#1012628
+Patch-mainline: 5.2.2
+Git-commit: 1b2be2071aca9aab22e3f902bcb0fca46a1d3b00
+
+commit 1b2be2071aca9aab22e3f902bcb0fca46a1d3b00 upstream.
+
+Use the correct bit for detection of the machine capability associated
+with the has_secure attribute. It is expected that the underlying
+platform (including hypervisors) unsets the bit when they don't provide
+secure ipl for their guests.
+
+Fixes: c9896acc7851 ("s390/ipl: Provide has_secure sysfs attribute")
+Cc: stable@vger.kernel.org # 5.2
+Signed-off-by: Philipp Rudo <prudo@linux.ibm.com>
+Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
+Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/s390/include/asm/sclp.h | 1 -
+ arch/s390/kernel/ipl.c | 7 +------
+ drivers/s390/char/sclp_early.c | 1 -
+ 3 files changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h
+index f577c5f6031a..c563f8368b19 100644
+--- a/arch/s390/include/asm/sclp.h
++++ b/arch/s390/include/asm/sclp.h
+@@ -80,7 +80,6 @@ struct sclp_info {
+ unsigned char has_gisaf : 1;
+ unsigned char has_diag318 : 1;
+ unsigned char has_sipl : 1;
+- unsigned char has_sipl_g2 : 1;
+ unsigned char has_dirq : 1;
+ unsigned int ibc;
+ unsigned int mtid;
+diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
+index d836af3ccc38..2c0a515428d6 100644
+--- a/arch/s390/kernel/ipl.c
++++ b/arch/s390/kernel/ipl.c
+@@ -286,12 +286,7 @@ static struct kobj_attribute sys_ipl_secure_attr =
+ static ssize_t ipl_has_secure_show(struct kobject *kobj,
+ struct kobj_attribute *attr, char *page)
+ {
+- if (MACHINE_IS_LPAR)
+- return sprintf(page, "%i\n", !!sclp.has_sipl);
+- else if (MACHINE_IS_VM)
+- return sprintf(page, "%i\n", !!sclp.has_sipl_g2);
+- else
+- return sprintf(page, "%i\n", 0);
++ return sprintf(page, "%i\n", !!sclp.has_sipl);
+ }
+
+ static struct kobj_attribute sys_ipl_has_secure_attr =
+diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c
+index 6c90aa725f23..e71992a3c55f 100644
+--- a/drivers/s390/char/sclp_early.c
++++ b/drivers/s390/char/sclp_early.c
+@@ -41,7 +41,6 @@ static void __init sclp_early_facilities_detect(struct read_info_sccb *sccb)
+ sclp.has_hvs = !!(sccb->fac119 & 0x80);
+ sclp.has_kss = !!(sccb->fac98 & 0x01);
+ sclp.has_sipl = !!(sccb->cbl & 0x02);
+- sclp.has_sipl_g2 = !!(sccb->cbl & 0x04);
+ if (sccb->fac85 & 0x02)
+ S390_lowcore.machine_flags |= MACHINE_FLAG_ESOP;
+ if (sccb->fac91 & 0x40)
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index b4290f730a..14483d9869 100644
--- a/series.conf
+++ b/series.conf
@@ -101,6 +101,7 @@
patches.kernel.org/5.2.2-011-x86-irq-Handle-spurious-interrupt-after-shutdow.patch
patches.kernel.org/5.2.2-012-x86-irq-Seperate-unused-system-vectors-from-spu.patch
patches.kernel.org/5.2.2-013-ARC-hide-unused-function-unw_hdr_alloc.patch
+ patches.kernel.org/5.2.2-014-s390-ipl-Fix-detection-of-has_secure-attribute.patch
########################################################
# Build fixes that apply to the vanilla kernel too.