提交 aeb87c3c 编写于 作者: T Thomas Huth 提交者: Paolo Bonzini

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: NThomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 b764bb1c
...@@ -457,8 +457,7 @@ static int handle_epsw(struct kvm_vcpu *vcpu) ...@@ -457,8 +457,7 @@ static int handle_epsw(struct kvm_vcpu *vcpu)
{ {
int reg1, reg2; int reg1, reg2;
reg1 = (vcpu->arch.sie_block->ipb & 0x00f00000) >> 24; kvm_s390_get_regs_rre(vcpu, &reg1, &reg2);
reg2 = (vcpu->arch.sie_block->ipb & 0x000f0000) >> 16;
/* This basically extracts the mask half of the psw. */ /* This basically extracts the mask half of the psw. */
vcpu->run->s.regs.gprs[reg1] &= 0xffffffff00000000; vcpu->run->s.regs.gprs[reg1] &= 0xffffffff00000000;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册