direct-io.hg

changeset 11490:b82a8107cae6

[POWERPC][XEN] Adjust DEC correctly

If DEC would have expired we now restore DEC to 0 so it will fire.
The Domain loses info about how late DEC was from looking at DEC but I
don't think anyone tracks that.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Fri Sep 01 12:12:43 2006 -0400 (2006-09-01)
parents ae7a722b7241
children 62196a0f3791
files xen/arch/powerpc/powerpc64/domain.c
line diff
     1.1 --- a/xen/arch/powerpc/powerpc64/domain.c	Fri Sep 01 11:42:51 2006 -0400
     1.2 +++ b/xen/arch/powerpc/powerpc64/domain.c	Fri Sep 01 12:12:43 2006 -0400
     1.3 @@ -55,7 +55,10 @@ void load_sprs(struct vcpu *v)
     1.4      /* adjust the DEC value to account for cycles while not
     1.5       * running this OS */
     1.6      timebase_delta = mftb() - v->arch.timebase;
     1.7 -    v->arch.dec -= timebase_delta;
     1.8 +    if (timebase_delta > v->arch.dec)
     1.9 +        v->arch.dec = 0;
    1.10 +    else
    1.11 +        v->arch.dec -= timebase_delta;
    1.12  }
    1.13  
    1.14  /* XXX evaluate all isyncs in segment code */