Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373143
b: refs/heads/master
c: 372b7c1
h: refs/heads/master
i:
  373141: e8d9def
  373139: cc4c5de
  373135: 69d8e3a
v: v3
  • Loading branch information
Mark Rutland authored and Christoffer Dall committed Apr 29, 2013
1 parent 404fb28 commit 0d6fd31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 210552c1bfe83122a480673660d5ca9821c944ae
refs/heads/master: 372b7c1bc80510225ca91cba75bc0850a6e16c39
7 changes: 4 additions & 3 deletions trunk/arch/arm/kvm/arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/kvm_host.h>
#include <linux/interrupt.h>

#include <clocksource/arm_arch_timer.h>
#include <asm/arch_timer.h>

#include <asm/kvm_vgic.h>
Expand Down Expand Up @@ -64,7 +65,7 @@ static void kvm_timer_inject_irq(struct kvm_vcpu *vcpu)
{
struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;

timer->cntv_ctl |= 1 << 1; /* Mask the interrupt in the guest */
timer->cntv_ctl |= ARCH_TIMER_CTRL_IT_MASK;
kvm_vgic_inject_irq(vcpu->kvm, vcpu->vcpu_id,
vcpu->arch.timer_cpu.irq->irq,
vcpu->arch.timer_cpu.irq->level);
Expand Down Expand Up @@ -133,8 +134,8 @@ void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu)
cycle_t cval, now;
u64 ns;

/* Check if the timer is enabled and unmasked first */
if ((timer->cntv_ctl & 3) != 1)
if ((timer->cntv_ctl & ARCH_TIMER_CTRL_IT_MASK) ||
!(timer->cntv_ctl & ARCH_TIMER_CTRL_ENABLE))
return;

cval = timer->cntv_cval;
Expand Down

0 comments on commit 0d6fd31

Please sign in to comment.