WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel][PATCH] fixed a bug which causes Oops

To: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel][PATCH] fixed a bug which causes Oops
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Wed, 31 May 2006 10:09:39 -0600
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 31 May 2006 09:09:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <2BF508F394C196468CCBEC031320DCDF0116FE81@pdsmsx405>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
References: <2BF508F394C196468CCBEC031320DCDF0116FE81@pdsmsx405>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2006-05-31 at 12:13 +0800, Xu, Anthony wrote:
> @@ -171,8 +174,11 @@ void vtm_set_itm(VCPU *vcpu, uint64_t va
>      clear_bit(ITV_VECTOR(vitv), &VCPU(vcpu, irr[0]));
>      VCPU(vcpu,itm)=val;
>      cur_itc =now_itc(vtm);
> +    diff_itc = val-cur_itc;
> +    if(diff_itc < 0)
> +        diff_itc = 0;
>      if(val >  vtm->last_itc){
> -        expires = NOW() + cycle_to_ns(val-cur_itc) + TIMER_SLOP;
> +        expires = NOW() + cycle_to_ns(diff_itc) + TIMER_SLOP; 

Hi Anthony,

  I think this should probably use time_after(), something like:

    if (time_after(val, cur_itc))
        val = cur_itc;

Thanks,

        Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>