[HVM] Only update guest time on timer interrupt delivery if the guest time is in the past.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
This commit is contained in:
Christian Limpach committed 2007-01-19 11:58:52 +00:00
1 parent 61a18d9c54
commit a963dfad52
1 file changed
+5 -1
+5 -1
View File
@@ -163,13 +163,17 @@ struct periodic_time *is_pt_irq(struct vcpu *v, int vector, int type)
void pt_intr_post(struct vcpu *v, int vector, int type)
{
struct periodic_time *pt = is_pt_irq(v, vector, type);
unsigned long long gtime;
if ( pt == NULL )
return;
pt->pending_intr_nr--;
pt->last_plt_gtime += pt->period_cycles;
hvm_set_guest_time(pt->vcpu, pt->last_plt_gtime);
gtime = hvm_get_guest_time(pt->vcpu);
if (gtime < pt->last_plt_gtime)
hvm_set_guest_time(pt->vcpu, pt->last_plt_gtime);
if ( pt->cb != NULL )
pt->cb(pt->vcpu, pt->priv);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.