aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2014-05-29 10:16:32 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 14:43:27 -0800
commit509e937b2e439947c51f04347b7e4bd4ef72b161 (patch)
tree7313de36410bae9a7776d166c4c8ac5d66635ace
parent50b2d089d38cb914ee106e0ac0601130099344c5 (diff)
downloadlinux-yocto-509e937b2e439947c51f04347b7e4bd4ef72b161.tar.gz
linux-yocto-509e937b2e439947c51f04347b7e4bd4ef72b161.tar.bz2
linux-yocto-509e937b2e439947c51f04347b7e4bd4ef72b161.zip
MIPS: KVM: Deliver guest interrupts after local_irq_disable()
commit 044f0f03eca0110e1835b2ea038a484b93950328 upstream. When about to run the guest, deliver guest interrupts after disabling host interrupts. This should prevent an hrtimer interrupt from being handled after delivering guest interrupts, and therefore not delivering the guest timer interrupt until after the next guest exit. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gleb Natapov <gleb@kernel.org> Cc: kvm@vger.kernel.org Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/mips/kvm/kvm_mips.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c
index 3e0ff8d0fbf9..28838f1a6c1a 100644
--- a/arch/mips/kvm/kvm_mips.c
+++ b/arch/mips/kvm/kvm_mips.c
@@ -418,11 +418,11 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
vcpu->mmio_needed = 0;
}
+ local_irq_disable();
/* Check if we have any exceptions/interrupts pending */
kvm_mips_deliver_interrupts(vcpu,
kvm_read_c0_guest_cause(vcpu->arch.cop0));
- local_irq_disable();
kvm_guest_enter();
r = __kvm_mips_vcpu_run(run, vcpu);