KVM: s390: sthyi: fix sthyi inline assembly
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 3 Aug 2017 11:05:11 +0000 (13:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2017 08:21:44 +0000 (10:21 +0200)
commita745333fa924b26c916e7b21d8e5177ca597b532
tree8101b5677ef6d51b18fb729fa197c725ae8b33d3
parent963068b1ff1c640ea54026c918d6616079e22bed
KVM: s390: sthyi: fix sthyi inline assembly

commit 4a4eefcd0e49f9f339933324c1bde431186a0a7d upstream.

The sthyi inline assembly misses register r3 within the clobber
list. The sthyi instruction will always write a return code to
register "R2+1", which in this case would be r3. Due to that we may
have register corruption and see host crashes or data corruption
depending on how gcc decided to allocate and use registers during
compile time.

Fixes: 95ca2cb57985 ("KVM: s390: Add sthyi emulation")
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kvm/sthyi.c