Skip to content

Commit 2862a2f

Browse files
hcahcaAlexander Gordeev
authored andcommitted
s390/qdio: fix do_sqbs() inline assembly constraint
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 <devbusid>: A QDIO problem occurred zfcp <devbusid>: A QDIO problem occurred zfcp <devbusid>: qdio: ZFCP on SC <sc> using AI:1 QEBSM:1 PRI:1 TDD:1 SIGA: W zfcp <devbusid>: A QDIO problem occurred zfcp <devbusid>: A QDIO problem occurred Each of the qdio problem message can be accompanied by the following entries for the affected subchannel <sc> in /sys/kernel/debug/s390dbf/qdio_error/hex_ascii for zfcp or qeth: <sc> ccq: 69.... <sc> SQBS ERROR. Reviewed-by: Benjamin Block <[email protected]> Cc: Steffen Maier <[email protected]> Fixes: 8129ee1 ("[PATCH] s390: qdio V=V pass-through") Cc: <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 2facd5d commit 2862a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/s390/cio/qdio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static inline int do_sqbs(u64 token, unsigned char state, int queue,
9595
" lgr 1,%[token]\n"
9696
" .insn rsy,0xeb000000008a,%[qs],%[ccq],0(%[state])"
9797
: [ccq] "+&d" (_ccq), [qs] "+&d" (_queuestart)
98-
: [state] "d" ((unsigned long)state), [token] "d" (token)
98+
: [state] "a" ((unsigned long)state), [token] "d" (token)
9999
: "memory", "cc", "1");
100100
*count = _ccq & 0xff;
101101
*start = _queuestart & 0xff;

0 commit comments

Comments
 (0)