]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kvm: validate the floating-point control before restoring it
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Fri, 12 Jun 2015 11:53:51 +0000 (13:53 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 22 Jul 2015 07:57:59 +0000 (09:57 +0200)
commit20b17739823570da6c2de4c51fd0d9c64c242064
treeb091792af14cd9f1ffcf54cdce37c1f4f402664d
parent650f6d2f7eecdc2daf91e39b3951afa6ae6d48ad
s390/kvm: validate the floating-point control before restoring it

The kvm_arch_vcpu_load() does not validate whether the floating-point
control (FPC) is valid.  Further, the return code of the restore is not
checked too.  If the FPC is invalid, the restore fails and the host FPC
value might remain.  The correct behavior would be to clear the FPC if it
is not valid.  Hence, validate the FPC value and, optionally, reset the
value before restoring it.

Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kvm/kvm-s390.c