From: Scott Wood Date: Tue, 8 Nov 2011 22:11:59 +0000 (-0600) Subject: KVM: PPC: booke: check for signals in kvmppc_vcpu_run X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1d1ef22208876511224a8797657e40e287e1f93d;p=linux-beck.git KVM: PPC: booke: check for signals in kvmppc_vcpu_run Currently we check prior to returning from a lightweight exit, but not prior to initial entry. book3s already does a similar test. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf Signed-off-by: Avi Kivity --- diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index b64220079d56..9c785896e867 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -322,11 +322,19 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) } local_irq_disable(); + + if (signal_pending(current)) { + kvm_run->exit_reason = KVM_EXIT_INTR; + ret = -EINTR; + goto out; + } + kvm_guest_enter(); ret = __kvmppc_vcpu_run(kvm_run, vcpu); kvm_guest_exit(); - local_irq_enable(); +out: + local_irq_enable(); return ret; }