]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commitbd45c81254bf177400257545a8f64d6f65f1fe99
treeb9cc37ebaf4a1b6e5dd4db27d2066811a32bd146
parent3119fe14a13d5f8ca7dd2525e8722ddba108df67
KVM: s390: do not clobber registers during guest reset/store status

BugLink: https://bugs.launchpad.net/bugs/1866678
[ Upstream commit 55680890ea78be0df5e1384989f1be835043c084 ]

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: e1788bb995be ("KVM: s390: handle floating point registers in the run ioctl not in vcpu_put/load")
Fixes: 31d8b8d41a7e ("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: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/s390/kvm/kvm-s390.c