KVM: PPC: Book3S HV: Fix mask size for emulated msgsndp
[sfrench/cifs-2.6.git] / arch / powerpc / kvm / book3s_hv.c
index cfaa91b27112e925334d04e7af9872a54d5c760b..6f612d240392f08d3fb6618c6abf9610cf23dfa0 100644 (file)
@@ -1241,9 +1241,9 @@ static int kvmppc_emulate_doorbell_instr(struct kvm_vcpu *vcpu)
        switch (get_xop(inst)) {
        case OP_31_XOP_MSGSNDP:
                arg = kvmppc_get_gpr(vcpu, rb);
-               if (((arg >> 27) & 0xf) != PPC_DBELL_SERVER)
+               if (((arg >> 27) & 0x1f) != PPC_DBELL_SERVER)
                        break;
-               arg &= 0x3f;
+               arg &= 0x7f;
                if (arg >= kvm->arch.emul_smt_mode)
                        break;
                tvcpu = kvmppc_find_vcpu(kvm, vcpu->vcpu_id - thr + arg);
@@ -1256,7 +1256,7 @@ static int kvmppc_emulate_doorbell_instr(struct kvm_vcpu *vcpu)
                break;
        case OP_31_XOP_MSGCLRP:
                arg = kvmppc_get_gpr(vcpu, rb);
-               if (((arg >> 27) & 0xf) != PPC_DBELL_SERVER)
+               if (((arg >> 27) & 0x1f) != PPC_DBELL_SERVER)
                        break;
                vcpu->arch.vcore->dpdes = 0;
                vcpu->arch.doorbell_request = 0;