Must always send VIRQ_TIMER to a blocked guest.
Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
}
-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);
read_unlock_irqrestore(&time_lock, flags);
- send_guest_virq(d, VIRQ_TIMER);
+ return 1;
}
/* 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);
}
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);
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]);
{
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. */
#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);