aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2013-06-12 07:54:57 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2013-06-17 11:10:38 -0400
commitaeb87c3cb7416d4d5931bc939cc083c731479de0 (patch)
tree9b7163fe8f2ba9f580abed36576397b409f5a3e8 /arch/s390/kvm
parentb764bb1c50c279b95a486d338418f7fda74fff71 (diff)
KVM: s390: Fix epsw instruction decoding
The handle_epsw() function calculated the first register in the wrong way, so that it always used r0 by mistake. Now the code uses the common helper function for decoding the registers of rre functions instead to avoid such mistakes. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/priv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index bda9c9b494f0..a0c63d79431b 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -457,8 +457,7 @@ static int handle_epsw(struct kvm_vcpu *vcpu)
457{ 457{
458 int reg1, reg2; 458 int reg1, reg2;
459 459
460 reg1 = (vcpu->arch.sie_block->ipb & 0x00f00000) >> 24; 460 kvm_s390_get_regs_rre(vcpu, &reg1, &reg2);
461 reg2 = (vcpu->arch.sie_block->ipb & 0x000f0000) >> 16;
462 461
463 /* This basically extracts the mask half of the psw. */ 462 /* This basically extracts the mask half of the psw. */
464 vcpu->run->s.regs.gprs[reg1] &= 0xffffffff00000000; 463 vcpu->run->s.regs.gprs[reg1] &= 0xffffffff00000000;