]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: do not clobber registers during guest reset/store status
authorChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 31 Jan 2020 10:02:00 +0000 (05:02 -0500)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 31 Jan 2020 11:49:24 +0000 (12:49 +0100)
commitbbfd98d033253200c7307ae0f4a9653eaf3adcaf
tree6318318b1aff2a5db2db688b4fb46f0d0f19aff2
parent2b809d77ec5c7f7b57032454e24b490d54410903
KVM: s390: do not clobber registers during guest reset/store status

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: 17faaa09e111 ("KVM: s390: handle floating point registers in the run ioctl not in vcpu_put/load")
Fixes: 8081b461927a ("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>
arch/s390/kvm/kvm-s390.c