From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuymA-00049t-Qm for qemu-devel@nongnu.org; Thu, 25 Mar 2010 21:55:54 -0400 Received: from [140.186.70.92] (port=33162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nuym9-00049Z-Eb for qemu-devel@nongnu.org; Thu, 25 Mar 2010 21:55:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nuym8-0007cm-7k for qemu-devel@nongnu.org; Thu, 25 Mar 2010 21:55:53 -0400 Received: from mail2.shareable.org ([80.68.89.115]:35767) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nuym7-0007cZ-1q for qemu-devel@nongnu.org; Thu, 25 Mar 2010 21:55:52 -0400 Date: Fri, 26 Mar 2010 01:55:45 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH 09/10] target-alpha: Implement load-locked/store-conditional properly. Message-ID: <20100326015545.GH19308@shareable.org> References: <20100325133920.GS16726@codesourcery.com> <4BAB853E.1070303@twiddle.net> <4BABA93C.9010305@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BABA93C.9010305@twiddle.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Blue Swirl , Nathan Froyd , qemu-devel@nongnu.org, aurelien@aurel32.net Richard Henderson wrote: > On 03/25/2010 10:40 AM, Blue Swirl wrote: > > Sparc V8 has two atomic instructions, ldstub and swap. > > I know -- but not the CAS operation being discussed here. > > As I think about this more and more, the Real Problem is > not with the CAS, but with the memory ordering requirements > of the guest vs the memory ordering of the host. It's easy > to implement things on x86, because of the host's strict > memory ordering. It would be much more difficult to properly > emulate x86 on a relaxed memory ordering host. We'd need to > insert barriers between pairs of qemu_{ld,st} operations. > > I may give this some proper thinking this weekend. Some host architectures have a strongly ordered mode, which might help, and be faster than putting barriers everywhere. -- Jamie