diff options
-rw-r--r-- | virt/kvm/arm/arch_timer.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index d43308dc3617..7fc272ecae16 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c | |||
@@ -508,6 +508,14 @@ static void kvm_timer_vcpu_load_nogic(struct kvm_vcpu *vcpu) | |||
508 | struct arch_timer_context *vtimer = vcpu_vtimer(vcpu); | 508 | struct arch_timer_context *vtimer = vcpu_vtimer(vcpu); |
509 | 509 | ||
510 | /* | 510 | /* |
511 | * Update the timer output so that it is likely to match the | ||
512 | * state we're about to restore. If the timer expires between | ||
513 | * this point and the register restoration, we'll take the | ||
514 | * interrupt anyway. | ||
515 | */ | ||
516 | kvm_timer_update_irq(vcpu, kvm_timer_should_fire(vtimer), vtimer); | ||
517 | |||
518 | /* | ||
511 | * When using a userspace irqchip with the architected timers and a | 519 | * When using a userspace irqchip with the architected timers and a |
512 | * host interrupt controller that doesn't support an active state, we | 520 | * host interrupt controller that doesn't support an active state, we |
513 | * must still prevent continuously exiting from the guest, and | 521 | * must still prevent continuously exiting from the guest, and |
@@ -730,7 +738,6 @@ static void kvm_timer_init_interrupt(void *info) | |||
730 | int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) | 738 | int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) |
731 | { | 739 | { |
732 | struct arch_timer_context *timer; | 740 | struct arch_timer_context *timer; |
733 | bool level; | ||
734 | 741 | ||
735 | switch (regid) { | 742 | switch (regid) { |
736 | case KVM_REG_ARM_TIMER_CTL: | 743 | case KVM_REG_ARM_TIMER_CTL: |
@@ -758,10 +765,6 @@ int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) | |||
758 | return -1; | 765 | return -1; |
759 | } | 766 | } |
760 | 767 | ||
761 | level = kvm_timer_should_fire(timer); | ||
762 | kvm_timer_update_irq(vcpu, level, timer); | ||
763 | timer_emulate(timer); | ||
764 | |||
765 | return 0; | 768 | return 0; |
766 | } | 769 | } |
767 | 770 | ||