s390/zcrypt: improve special ap message cmd handling
authorHarald Freudenberger <freude@linux.ibm.com>
Mon, 19 Nov 2018 10:36:13 +0000 (11:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:47:04 +0000 (19:47 +0100)
commit87ae793221cc1cc5903d2b547418f36d8df32257
tree7508dddd4cf7d8d71a6e690c66ee4016127fc6b6
parenteca31fc35afb94dcc190e19ff1acc4a23ae78c64
s390/zcrypt: improve special ap message cmd handling

[ Upstream commit be534791011100d204602e2e0496e9e6ce8edf63 ]

There exist very few ap messages which need to have the 'special' flag
enabled. This flag tells the firmware layer to do some pre- and maybe
postprocessing. However, it may happen that this special flag is
enabled but the firmware is unable to deal with this kind of message
and thus returns with reply code 0x41. For example older firmware may
not know the newest messages triggered by the zcrypt device driver and
thus react with reject and the named reply code. Unfortunately this
reply code is not known to the zcrypt error routines and thus default
behavior is to switch the ap queue offline.

This patch now makes the ap error routine aware of the reply code and
so userspace is informed about the bad processing result but the queue
is not switched to offline state any more.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/include/uapi/asm/zcrypt.h
drivers/s390/crypto/zcrypt_error.h