Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282003
b: refs/heads/master
c: 3f2e526
h: refs/heads/master
i:
  282001: 4b0d39a
  281999: ef56835
v: v3
  • Loading branch information
Jan Kiszka authored and Avi Kivity committed Dec 27, 2011
1 parent 0fa59e8 commit 1bef8eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 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: b297e672e24687546ac74af5ae5e8c4a022b9806
refs/heads/master: 3f2e5260f5a17d37be3e3c83aca2f335b9bf3893
26 changes: 4 additions & 22 deletions trunk/arch/x86/kvm/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
#include <linux/atomic.h>
#include "kvm_timer.h"

static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer)
enum hrtimer_restart kvm_timer_fn(struct hrtimer *data)
{
int restart_timer = 0;
struct kvm_timer *ktimer = container_of(data, struct kvm_timer, timer);
struct kvm_vcpu *vcpu = ktimer->vcpu;
wait_queue_head_t *q = &vcpu->wq;

/*
Expand All @@ -40,26 +41,7 @@ static int __kvm_timer_fn(struct kvm_vcpu *vcpu, struct kvm_timer *ktimer)

if (ktimer->t_ops->is_periodic(ktimer)) {
hrtimer_add_expires_ns(&ktimer->timer, ktimer->period);
restart_timer = 1;
}

return restart_timer;
}

enum hrtimer_restart kvm_timer_fn(struct hrtimer *data)
{
int restart_timer;
struct kvm_vcpu *vcpu;
struct kvm_timer *ktimer = container_of(data, struct kvm_timer, timer);

vcpu = ktimer->vcpu;
if (!vcpu)
return HRTIMER_NORESTART;

restart_timer = __kvm_timer_fn(vcpu, ktimer);
if (restart_timer)
return HRTIMER_RESTART;
else
} else
return HRTIMER_NORESTART;
}

0 comments on commit 1bef8eb

Please sign in to comment.