KVM: s390: Fix epsw instruction decoding
authorThomas Huth <thuth@linux.vnet.ibm.com>
Wed, 12 Jun 2013 11:54:57 +0000 (13:54 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 Jun 2013 15:10:38 +0000 (17:10 +0200)
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>
arch/s390/kvm/priv.c

index bda9c9b494f0243fd06b019a63ae8094fe8e68e4..a0c63d79431bea67f79c73f4273a1d7460db5db3 100644 (file)
@@ -457,8 +457,7 @@ static int handle_epsw(struct kvm_vcpu *vcpu)
 {
        int reg1, reg2;
 
-       reg1 = (vcpu->arch.sie_block->ipb & 0x00f00000) >> 24;
-       reg2 = (vcpu->arch.sie_block->ipb & 0x000f0000) >> 16;
+       kvm_s390_get_regs_rre(vcpu, &reg1, &reg2);
 
        /* This basically extracts the mask half of the psw. */
        vcpu->run->s.regs.gprs[reg1] &= 0xffffffff00000000;
This page took 0.025535 seconds and 5 git commands to generate.