direct-io.hg

changeset 13498:2ef07c610729

[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>
author Christian Limpach <Christian.Limpach@xensource.com>
date Fri Jan 19 11:58:52 2007 +0000 (2007-01-19)
parents 683bc79cf579
children 9b76e8f30c88
files xen/arch/x86/hvm/vpt.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vpt.c	Fri Jan 19 10:12:39 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/vpt.c	Fri Jan 19 11:58:52 2007 +0000
     1.3 @@ -163,13 +163,17 @@ struct periodic_time *is_pt_irq(struct v
     1.4  void pt_intr_post(struct vcpu *v, int vector, int type)
     1.5  {
     1.6      struct periodic_time *pt = is_pt_irq(v, vector, type);
     1.7 +    unsigned long long gtime;
     1.8  
     1.9      if ( pt == NULL )
    1.10          return;
    1.11  
    1.12      pt->pending_intr_nr--;
    1.13      pt->last_plt_gtime += pt->period_cycles;
    1.14 -    hvm_set_guest_time(pt->vcpu, pt->last_plt_gtime);
    1.15 +
    1.16 +    gtime = hvm_get_guest_time(pt->vcpu);
    1.17 +    if (gtime < pt->last_plt_gtime)
    1.18 +        hvm_set_guest_time(pt->vcpu, pt->last_plt_gtime);
    1.19  
    1.20      if ( pt->cb != NULL )
    1.21          pt->cb(pt->vcpu, pt->priv);