From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7FjM-0008Rs-SO for qemu-devel@nongnu.org; Wed, 28 Apr 2010 18:27:44 -0400 Received: from [140.186.70.92] (port=56146 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7FjL-0008Oj-6i for qemu-devel@nongnu.org; Wed, 28 Apr 2010 18:27:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7FjI-0000eq-0Z for qemu-devel@nongnu.org; Wed, 28 Apr 2010 18:27:43 -0400 Received: from mx20.gnu.org ([199.232.41.8]:28433) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7FjH-0000em-VL for qemu-devel@nongnu.org; Wed, 28 Apr 2010 18:27:39 -0400 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1O7FjH-0003cD-EV for qemu-devel@nongnu.org; Wed, 28 Apr 2010 18:27:39 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Atomicity of i386 guest atomic instructions Date: Wed, 28 Apr 2010 23:27:34 +0100 References: <4BD1D883.9080601@jermar.eu> <20100424024902.GI15349@shareable.org> In-Reply-To: <20100424024902.GI15349@shareable.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004282327.34694.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jakub Jermar , Alexander Graf > Alexander Graf wrote: > > They should be atomic. TCG SMP swaps between different vCPUs only > > after translation blocks are done. In fact, the only way I'm aware > > of to stop the execution of a TB mid-way is a page fault. > > A page fault would interrupt it if the atomic is implemented as > a read followed by a write, and the write faults. Yes, but in that case the whole instruction should be abandoned. Paul