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-devel

Re: [Xen-devel] [Patch] cmpxchg emulation returns wrong ZF

To: "Juergen Gross" <juergen.gross@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] cmpxchg emulation returns wrong ZF
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 06 Aug 2009 09:01:48 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 06 Aug 2009 01:02:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A7A7CEB.9080702@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4A7A7CEB.9080702@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Juergen Gross <juergen.gross@xxxxxxxxxxxxxx> 06.08.09 08:49 >>>
>Hi,
>
>attached patch corrects a bug in cmpxchg emulation in the hypervisor.
>
>BS2000 running as HVM-domain on 4 vcpus (no HAP) hit an error due to this bug
>after several days.

Why don't you just clear ZF in that case? I think it is intentional that the
code doesn't loop inside the hypervisor, since that loop is non-preemptible
(whereas returning to the guest and re-issuing the instruction is).

Further, I'm not really clear why that change is necessary at all: In the
code prior to the patch, register state is not being updated if
ops->cmpxchg() failed, and hence the old value of ZF is simply being
retained - which is the correct thing to do when intending to re-start
the instruction.

Jan


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

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