WSL2-Linux-Kernel/arch/s390/kvm
David Hildenbrand 9522b37f5a KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS
With MACHINE_HAS_VX, we convert the floating point registers from the
vector registeres when storing the status. For other VCPUs, these are
stored to vcpu->run->s.regs.vrs, but we are using current->thread.fpu.vxrs,
which resolves to the currently loaded VCPU.

So kvm_s390_store_status_unloaded() currently writes the wrong floating
point registers (converted from the vector registers) when called from
another VCPU on a z13.

This is only the case for old user space not handling SIGP STORE STATUS and
SIGP STOP AND STORE STATUS, but relying on the kernel implementation. All
other calls come from the loaded VCPU via kvm_s390_store_status().

Fixes: 9abc2a08a7 (KVM: s390: fix memory overwrites when vx is disabled)
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-03-08 12:47:01 +01:00
..
Kconfig KVM: s390: Enable the KVM-VFIO device 2016-01-26 15:40:17 +01:00
Makefile KVM: s390: Enable the KVM-VFIO device 2016-01-26 15:40:17 +01:00
diag.c KVM: Use common function for VCPU lookup by id 2015-11-30 12:47:04 +01:00
gaccess.c KVM: s390: Introduce switching code 2015-11-30 12:47:08 +01:00
gaccess.h KVM: s390: Add MEMOP ioctls for reading/writing guest memory 2015-03-17 16:26:24 +01:00
guestdbg.c s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
intercept.c KVM: s390: rewrite vcpu_post_run and drop out early 2015-11-30 12:47:05 +01:00
interrupt.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-01-13 13:16:16 -08:00
irq.h KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
kvm-s390.c KVM: s390: correct fprs on SIGP (STOP AND) STORE STATUS 2016-03-08 12:47:01 +01:00
kvm-s390.h KVM: s390: Introduce new structures 2015-11-30 12:47:07 +01:00
priv.c s390: rename struct _lowcore to struct lowcore 2016-01-11 12:27:15 +01:00
sigp.c KVM: s390: fix wrong lookup of VCPUs by array index 2015-11-19 14:47:43 +01:00
trace-s390.h KVM: s390: obey kptr_restrict in traces 2015-12-15 17:06:32 +01:00
trace.h KVM: s390: interpretive execution of SIGP EXTERNAL CALL 2014-05-16 14:57:28 +02:00