提交 82a12737 编写于 作者: J Jason J. Herne 提交者: Marcelo Tosatti

s390/kvm: Interrupt injection bugfix

EXTERNAL_CALL and EMERGENCY type interrupts need to preserve their interrupt
code parameter when being injected from user space.
Signed-off-by: NJason J. Herne <jjherne@us.ibm.com>
Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
上级 d151f63f
...@@ -629,10 +629,27 @@ int kvm_s390_inject_vcpu(struct kvm_vcpu *vcpu, ...@@ -629,10 +629,27 @@ int kvm_s390_inject_vcpu(struct kvm_vcpu *vcpu,
break; break;
case KVM_S390_SIGP_STOP: case KVM_S390_SIGP_STOP:
case KVM_S390_RESTART: case KVM_S390_RESTART:
VCPU_EVENT(vcpu, 3, "inject: type %x", s390int->type);
inti->type = s390int->type;
break;
case KVM_S390_INT_EXTERNAL_CALL: case KVM_S390_INT_EXTERNAL_CALL:
if (s390int->parm & 0xffff0000) {
kfree(inti);
return -EINVAL;
}
VCPU_EVENT(vcpu, 3, "inject: external call source-cpu:%u",
s390int->parm);
inti->type = s390int->type;
inti->extcall.code = s390int->parm;
break;
case KVM_S390_INT_EMERGENCY: case KVM_S390_INT_EMERGENCY:
VCPU_EVENT(vcpu, 3, "inject: type %x", s390int->type); if (s390int->parm & 0xffff0000) {
kfree(inti);
return -EINVAL;
}
VCPU_EVENT(vcpu, 3, "inject: emergency %u\n", s390int->parm);
inti->type = s390int->type; inti->type = s390int->type;
inti->emerg.code = s390int->parm;
break; break;
case KVM_S390_INT_VIRTIO: case KVM_S390_INT_VIRTIO:
case KVM_S390_INT_SERVICE: case KVM_S390_INT_SERVICE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册