diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-05-29 05:16:32 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-05-30 07:01:10 -0400 |
commit | 044f0f03eca0110e1835b2ea038a484b93950328 (patch) | |
tree | a5400207feeaea3fe7efba2c51f06711f704dcf8 /arch/mips | |
parent | 16fd5c1de4f00c7887e4c715dd46872a97e30e25 (diff) |
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 <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>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kvm/kvm_mips.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
419 | vcpu->mmio_needed = 0; | 419 | vcpu->mmio_needed = 0; |
420 | } | 420 | } |
421 | 421 | ||
422 | local_irq_disable(); | ||
422 | /* Check if we have any exceptions/interrupts pending */ | 423 | /* Check if we have any exceptions/interrupts pending */ |
423 | kvm_mips_deliver_interrupts(vcpu, | 424 | kvm_mips_deliver_interrupts(vcpu, |
424 | kvm_read_c0_guest_cause(vcpu->arch.cop0)); | 425 | kvm_read_c0_guest_cause(vcpu->arch.cop0)); |
425 | 426 | ||
426 | local_irq_disable(); | ||
427 | kvm_guest_enter(); | 427 | kvm_guest_enter(); |
428 | 428 | ||
429 | r = __kvm_mips_vcpu_run(run, vcpu); | 429 | r = __kvm_mips_vcpu_run(run, vcpu); |