s390/cpacf: Rework cpacf_pcc() to return condition code
authorHarald Freudenberger <freude@linux.ibm.com>
Wed, 14 May 2025 09:09:54 +0000 (11:09 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Sat, 17 May 2025 08:49:21 +0000 (10:49 +0200)
commite3bcd0f7a9b31ca5ac5825b6d808bf5226f4c706
treef5d5ef26a43cc4fdd78b64e264f49f6b37437f55
parent3919600d32b92e67f1d28376bd63152306e99452
s390/cpacf: Rework cpacf_pcc() to return condition code

Some of the pcc sub-functions have a protected key as
input and thus may run into the situation that this
key may be invalid for example due to live guest migration
to another physical hardware.

Rework the inline assembler function cpacf_pcc() to
return the condition code (cc) as return value:
  0 - cc code 0 (normal completion)
  1 - cc code 1 (prot key wkvp mismatch or src op out of range)
  2 - cc code 2 (something invalid, scalar multiply infinity, ...)
Note that cc 3 (partial completion) is handled within the asm code
and never returned.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Link: https://lore.kernel.org/r/20250514090955.72370-2-freude@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/cpacf.h