From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8VKa-0004pr-HF for qemu-devel@nongnu.org; Thu, 02 Jun 2016 12:18:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8VKQ-0002SN-Gl for qemu-devel@nongnu.org; Thu, 02 Jun 2016 12:18:47 -0400 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:35463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8VKQ-0002Rp-8w for qemu-devel@nongnu.org; Thu, 02 Jun 2016 12:18:38 -0400 Received: by mail-lf0-x234.google.com with SMTP id w16so37402638lfd.2 for ; Thu, 02 Jun 2016 09:18:38 -0700 (PDT) References: <20160531183928.29406-1-bobby.prani@gmail.com> <20160531183928.29406-2-bobby.prani@gmail.com> <016450d7-f6b9-ef14-9ef0-96d78eb1ac5c@twiddle.net> From: Sergey Fedorov Message-ID: <57505C5A.7070609@gmail.com> Date: Thu, 2 Jun 2016 19:18:34 +0300 MIME-Version: 1.0 In-Reply-To: <016450d7-f6b9-ef14-9ef0-96d78eb1ac5c@twiddle.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , Pranith Kumar Cc: "open list:All patches CC here" , =?UTF-8?Q?Alex_Benn=c3=a9e?= On 02/06/16 00:35, Richard Henderson wrote: > On 06/01/2016 11:43 AM, Pranith Kumar wrote: >> All we want to do here is map a barrier instruction from guest to a >> barrier instruction on hist. This mapping is 1:1 if the host has >> barrier instructions with matching semantics. Otherwise we generate a >> multi-op instruction sequence. Some examples are: load acquire(ldar) >> on ARM64 guest will map to dmb+load on ARMv7 target, store >> fence(sfence) on x86 guest will map to dmb on ARMv7 target. > > Perhaps we should model this like the Sparc membar instruction, with > individual bits for all combinations of Load x Store. One can then > describe exactly what the target semantics are for each barrier. Seconded. Given that we don't support Alpha host we can ignore its unique "Dependent loads reordered" feature. I suppose we're not going to add Alpha host support :) Kind regards, Sergey