linux-stable/arch/s390/kvm
Christian Borntraeger d1568e6370 KVM: s390: do not clobber registers during guest reset/store status
commit 55680890ea upstream.

The initial CPU reset clobbers the userspace fpc and the store status
ioctl clobbers the guest acrs + fpr.  As these calls are only done via
ioctl (and not via vcpu_run), no CPU context is loaded, so we can (and
must) act directly on the sync regs, not on the thread context.

Cc: stable@kernel.org
Fixes: e1788bb995 ("KVM: s390: handle floating point registers in the run ioctl not in vcpu_put/load")
Fixes: 31d8b8d41a ("KVM: s390: handle access registers in the run ioctl not in vcpu_put/load")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20200131100205.74720-2-frankja@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:34:11 -08:00
..
diag.c KVM: s390: add vcpu stat counters for many instruction 2018-01-24 16:49:02 +01:00
gaccess.c treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
gaccess.h KVM: s390: Remove redundant license text 2017-12-06 09:18:42 +01:00
guestdbg.c KVM: s390: introduce defines for control registers 2018-05-17 09:02:27 +02:00
intercept.c KVM: s390: add exit io request stats and simplify code 2018-03-14 19:21:11 +00:00
interrupt.c KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl 2019-09-19 09:09:34 +02:00
irq.h KVM: s390: Remove redundant license text 2017-12-06 09:18:42 +01:00
Kconfig KVM: introduce kvm_arch_vcpu_async_ioctl 2017-12-14 09:26:59 +01:00
kvm-s390.c KVM: s390: do not clobber registers during guest reset/store status 2020-02-11 04:34:11 -08:00
kvm-s390.h KVM: s390: reset crypto attributes for all vcpus 2018-05-17 09:02:10 +02:00
Makefile KVM: s390: Remove redundant license text 2017-12-06 09:18:42 +01:00
priv.c KVM: s390: Fix pfmf and conditional skey emulation 2018-09-04 11:24:43 +02:00
sigp.c KVM: s390: introduce and use kvm_s390_test_cpuflags() 2018-01-24 17:46:42 +01: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: copy wrapping keys to right place 2018-09-04 11:26:11 +02:00