linux/arch/s390/kvm
Heiko Carstens 53980121e1 KVM: s390: fix sthyi error handling
[ Upstream commit 0c02cc576e ]

Commit 9fb6c9b3fe ("s390/sthyi: add cache to store hypervisor info")
added cache handling for store hypervisor info. This also changed the
possible return code for sthyi_fill().

Instead of only returning a condition code like the sthyi instruction would
do, it can now also return a negative error value (-ENOMEM). handle_styhi()
was not changed accordingly. In case of an error, the negative error value
would incorrectly injected into the guest PSW.

Add proper error handling to prevent this, and update the comment which
describes the possible return values of sthyi_fill().

Fixes: 9fb6c9b3fe ("s390/sthyi: add cache to store hypervisor info")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Link: https://lore.kernel.org/r/20230727182939.2050744-1-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-08-11 12:14:08 +02:00
..
diag.c KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler 2023-07-19 16:36:38 +02:00
gaccess.c KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg 2023-02-07 18:06:00 +01:00
gaccess.h KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg 2023-02-07 18:06:00 +01:00
guestdbg.c KVM: s390: Add memcg accounting to KVM allocations 2020-12-10 13:36:05 +01:00
intercept.c KVM: s390: fix sthyi error handling 2023-08-11 12:14:08 +02:00
interrupt.c KVM: s390: interrupt: fix virtual-physical confusion for next alert GISA 2023-04-20 16:26:20 +02:00
Kconfig kvm: Remove "select SRCU" 2023-04-05 13:47:42 +00:00
kvm-s390.c KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes 2023-07-19 16:36:35 +02:00
kvm-s390.h KVM: s390: Mark __kvm_s390_init() and its descendants as __init 2022-12-29 15:41:22 -05:00
Makefile KVM: s390: pci: add basic kvm_zdev structure 2022-07-11 09:54:27 +02:00
pci.c KVM: s390: pci: fix virtual-physical confusion on module unload/load 2023-04-20 16:30:35 +02:00
pci.h KVM: s390: Mark __kvm_s390_init() and its descendants as __init 2022-12-29 15:41:22 -05:00
priv.c KVM: s390: sida: sort out physical vs virtual pointers usage 2022-10-26 14:27:41 +02:00
pv.c KVM: s390: pv: simplify shutdown and fix race 2023-08-03 10:25:41 +02:00
sigp.c KVM: s390: pv: don't present the ecall interrupt twice 2022-07-19 15:48:14 +02:00
trace-s390.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vsie.c KVM: s390: vsie: fix the length of APCB bitmap 2023-07-19 16:36:38 +02:00