]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: s390: enable SIMD only when no VCPUs were created
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Fri, 6 Nov 2015 11:08:48 +0000 (12:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:34:35 +0000 (14:34 -0500)
commit5d19d22c7ba11df61e175dc289ef1058270b00ae
tree62b3f800aa587592a20040dc12e5cdd1b6adc1f0
parent705e4e3c2cd5b193ebf83e762fb303be7b256cea
KVM: s390: enable SIMD only when no VCPUs were created

commit 5967c17b118a2bd1dd1d554cc4eee16233e52bec upstream.

We should never allow to enable/disable any facilities for the guest
when other VCPUs were already created.

kvm_arch_vcpu_(load|put) relies on SIMD not changing during runtime.
If somebody would create and run VCPUs and then decides to enable
SIMD, undefined behaviour could be possible (e.g. vector save area
not being set up).

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kvm/kvm-s390.c