diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-03-08 13:40:59 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-03-08 13:40:59 +0000 |
commit | 8ea68d85e3bd918189fb8c91f0da49ef1921fa96 (patch) | |
tree | 5ced2cb147e96038d3f829aed3298a4302a372c9 | |
parent | bbebb1de83bdc97d3394aca04a8bce2b97738cf1 (diff) | |
download | xen-8ea68d85e3bd918189fb8c91f0da49ef1921fa96.tar.gz xen-8ea68d85e3bd918189fb8c91f0da49ef1921fa96.tar.bz2 xen-8ea68d85e3bd918189fb8c91f0da49ef1921fa96.zip |
bitkeeper revision 1.1159.258.25 (422dab6bOBL6I9LRZYfF0ExfT5VXww)
Must always send VIRQ_TIMER to a blocked guest.
Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
-rw-r--r-- | xen/arch/x86/time.c | 9 | ||||
-rw-r--r-- | xen/common/schedule.c | 11 | ||||
-rw-r--r-- | xen/include/xen/time.h | 2 |
3 files changed, 12 insertions, 10 deletions
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 685160cd14..06b0acf44a 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -276,13 +276,13 @@ s_time_t get_s_time(void) } -void update_dom_time(struct domain *d) +int update_dom_time(struct domain *d) { shared_info_t *si = d->shared_info; unsigned long flags; if ( d->last_propagated_timestamp == full_tsc_irq ) - return; + return 0; read_lock_irqsave(&time_lock, flags); @@ -302,7 +302,7 @@ void update_dom_time(struct domain *d) read_unlock_irqrestore(&time_lock, flags); - send_guest_virq(d, VIRQ_TIMER); + return 1; } @@ -330,7 +330,8 @@ void do_settime(unsigned long secs, unsigned long usecs, u64 system_time_base) /* Others will pick up the change at the next tick. */ current->last_propagated_timestamp = 0; /* force propagation */ - update_dom_time(current); + (void)update_dom_time(current); + send_guest_virq(current, VIRQ_TIMER); } diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 09c3e77ad9..62f764e9d9 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -396,8 +396,8 @@ void __enter_scheduler(void) clear_bit(DF_RUNNING, &prev->flags); /* Ensure that the domain has an up-to-date time base. */ - if ( !is_idle_task(next) ) - update_dom_time(next); + if ( !is_idle_task(next) && update_dom_time(next) ) + send_guest_virq(next, VIRQ_TIMER); schedule_tail(next); @@ -434,8 +434,8 @@ static void t_timer_fn(unsigned long unused) TRACE_0D(TRC_SCHED_T_TIMER_FN); - if ( !is_idle_task(d) ) - update_dom_time(d); + if ( !is_idle_task(d) && update_dom_time(d) ) + send_guest_virq(d, VIRQ_TIMER); t_timer[d->processor].expires = NOW() + MILLISECS(10); add_ac_timer(&t_timer[d->processor]); @@ -446,7 +446,8 @@ static void dom_timer_fn(unsigned long data) { struct domain *d = (struct domain *)data; TRACE_0D(TRC_SCHED_DOM_TIMER_FN); - update_dom_time(d); + (void)update_dom_time(d); + send_guest_virq(d, VIRQ_TIMER); } /* Initialise the data structures. */ diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h index e725c4ed94..4df2e96a55 100644 --- a/xen/include/xen/time.h +++ b/xen/include/xen/time.h @@ -53,7 +53,7 @@ s_time_t get_s_time(void); #define MICROSECS(_us) (((s_time_t)(_us)) * 1000ULL ) struct domain; -extern void update_dom_time(struct domain *d); +extern int update_dom_time(struct domain *d); extern void do_settime(unsigned long secs, unsigned long usecs, u64 system_time_base); |