From: James Hogan Date: Thu, 29 May 2014 09:16:32 +0000 (+0100) Subject: MIPS: KVM: Deliver guest interrupts after local_irq_disable() X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~9870^2~11^2~15 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=044f0f03eca0110e1835b2ea038a484b93950328;p=mirror_ubuntu-artful-kernel.git MIPS: KVM: Deliver guest interrupts after local_irq_disable() 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 Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: Sanjay Lal Signed-off-by: Paolo Bonzini --- diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index e4cb7cff9a28..0a9c7ab56df1 100644 --- a/arch/mips/kvm/kvm_mips.c +++ b/arch/mips/kvm/kvm_mips.c @@ -419,11 +419,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);