diff options
author | Avi Kivity <avi@qumranet.com> | 2008-07-06 15:48:31 +0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 12:42:38 +0300 |
commit | ac9f6dc0db0b5582ebf8bb720d7c41c3d2159013 (patch) | |
tree | 74dc0ada1c80c45feb4f7104613826726aebdfc6 /arch/x86/kvm | |
parent | 4e1096d27f3d095735c1c69c7b0a26a06a0d454e (diff) | |
download | blackbird-op-linux-ac9f6dc0db0b5582ebf8bb720d7c41c3d2159013.tar.gz blackbird-op-linux-ac9f6dc0db0b5582ebf8bb720d7c41c3d2159013.zip |
KVM: Apply the kernel sigmask to vcpus blocked due to being uninitialized
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/x86.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 55906e4c4676..89fc8565edee 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2958,15 +2958,15 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) vcpu_load(vcpu); + if (vcpu->sigset_active) + sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); + if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZED)) { kvm_vcpu_block(vcpu); - vcpu_put(vcpu); - return -EAGAIN; + r = -EAGAIN; + goto out; } - if (vcpu->sigset_active) - sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); - /* re-sync apic's tpr */ if (!irqchip_in_kernel(vcpu->kvm)) kvm_set_cr8(vcpu, kvm_run->cr8); |