From dcbf1cc282cc1dbcffd596b8feb476cda2f2d5fe Mon Sep 17 00:00:00 2001 From: Miroslav Franc Date: May 24 2023 15:54:19 +0000 Subject: s390/qdio: fix do_sqbs() inline assembly constraint (git-fixes bsc#1211693). --- diff --git a/patches.suse/s390-qdio-fix-do_sqbs-inline-assembly-constraint.patch b/patches.suse/s390-qdio-fix-do_sqbs-inline-assembly-constraint.patch new file mode 100644 index 0000000..5ad8cbf --- /dev/null +++ b/patches.suse/s390-qdio-fix-do_sqbs-inline-assembly-constraint.patch @@ -0,0 +1,62 @@ +From: Heiko Carstens +Date: Thu, 11 May 2023 17:04:41 +0200 +Subject: s390/qdio: fix do_sqbs() inline assembly constraint +Git-commit: 2862a2fdfae875888e3c1c3634e3422e01d98147 +Patch-mainline: v6.4-rc3 +References: git-fixes bsc#1211693 + +Use "a" constraint instead of "d" constraint to pass the state parameter to +the do_sqbs() inline assembly. This prevents that general purpose register +zero is used for the state parameter. + +If the compiler would select general purpose register zero this would be +problematic for the used instruction in rsy format: the register used for +the state parameter is a base register. If the base register is general +purpose register zero the contents of the register are unexpectedly ignored +when the instruction is executed. + +This only applies to z/VM guests using QIOASSIST with dedicated (pass through) +QDIO-based devices such as FCP [zfcp driver] as well as real OSA or +HiperSockets [qeth driver]. + +A possible symptom for this case using zfcp is the following repeating kernel +message pattern: + +zfcp : A QDIO problem occurred +zfcp : A QDIO problem occurred +zfcp : qdio: ZFCP on SC using AI:1 QEBSM:1 PRI:1 TDD:1 SIGA: W +zfcp : A QDIO problem occurred +zfcp : A QDIO problem occurred + +Each of the qdio problem message can be accompanied by the following entries +for the affected subchannel in +/sys/kernel/debug/s390dbf/qdio_error/hex_ascii for zfcp or qeth: + + ccq: 69.... + SQBS ERROR. + +Reviewed-by: Benjamin Block +Cc: Steffen Maier +Fixes: 8129ee164267 ("[PATCH] s390: qdio V=V pass-through") +Cc: +Signed-off-by: Heiko Carstens +Signed-off-by: Alexander Gordeev +Acked-by: Miroslav Franc +--- + drivers/s390/cio/qdio.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h +index 5ea6249d8180..641f0dbb65a9 100644 +--- a/drivers/s390/cio/qdio.h ++++ b/drivers/s390/cio/qdio.h +@@ -95,7 +95,7 @@ static inline int do_sqbs(u64 token, unsigned char state, int queue, + " lgr 1,%[token]\n" + " .insn rsy,0xeb000000008a,%[qs],%[ccq],0(%[state])" + : [ccq] "+&d" (_ccq), [qs] "+&d" (_queuestart) +- : [state] "d" ((unsigned long)state), [token] "d" (token) ++ : [state] "a" ((unsigned long)state), [token] "d" (token) + : "memory", "cc", "1"); + *count = _ccq & 0xff; + *start = _queuestart & 0xff; + diff --git a/series.conf b/series.conf index 2065458..799a828 100644 --- a/series.conf +++ b/series.conf @@ -20085,6 +20085,7 @@ patches.suse/ALSA-hda-Fix-Oops-by-9.1-surround-channel-names.patch patches.suse/ALSA-cs46xx-mark-snd_cs46xx_download_image-as-static.patch patches.suse/ALSA-hda-Add-NVIDIA-codec-IDs-a3-through-a7-to-patch.patch + patches.suse/s390-qdio-fix-do_sqbs-inline-assembly-constraint.patch patches.suse/Documentation-filesystems-sharedsubtree-add-section-.patch patches.suse/Documentation-filesystems-ramfs-rootfs-initramfs-use.patch patches.suse/drm-exynos-fix-g2d_open-close-helper-function-defini.patch