From: Christian Limpach Date: Fri, 19 Jan 2007 11:58:52 +0000 (+0000) Subject: [HVM] Only update guest time on timer interrupt delivery if the guest time is in... X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15371^2~133^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a963dfad5280fb6ce6af3b587ead7b0fe3ee5ebd;p=xen.git [HVM] Only update guest time on timer interrupt delivery if the guest time is in the past. Signed-off-by: Christian Limpach --- diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index 8287289172..6bd9fab154 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -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);