From: Alexander Graf <agraf@suse.de>
Date: Mon, 30 Apr 2012 08:56:12 +0000 (+0200)
Subject: KVM: PPC: Book3S: Enable IRQs during exit handling
X-Git-Tag: v3.5-rc1~88^2~11^2~5
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3b1d9d7d95e7c62518160edebd92450b58c6d55f;p=linux.git

KVM: PPC: Book3S: Enable IRQs during exit handling

While handling an exit, we should listen for interrupts and make sure to
receive them when they arrive, to keep our latencies low.

Signed-off-by: Alexander Graf <agraf@suse.de>
---

diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
index dba282e5093f..d169a0aa4887 100644
--- a/arch/powerpc/kvm/book3s_pr.c
+++ b/arch/powerpc/kvm/book3s_pr.c
@@ -548,6 +548,9 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
 	run->exit_reason = KVM_EXIT_UNKNOWN;
 	run->ready_for_interrupt_injection = 1;
 
+	/* We get here with MSR.EE=0, so enable it to be a nice citizen */
+	__hard_irq_enable();
+
 	trace_kvm_book3s_exit(exit_nr, vcpu);
 	preempt_enable();
 	kvm_resched(vcpu);