Received: from eggs.gnu.org ([2001:4830:134:3::10]:42960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFOSk-0006nu-GX for qemu-devel@nongnu.org; Tue, 21 Jun 2016 12:23:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFOSf-0002jo-1T for qemu-devel@nongnu.org; Tue, 21 Jun 2016 12:23:41 -0400 Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:33390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFOSe-0002jk-Tf for qemu-devel@nongnu.org; Tue, 21 Jun 2016 12:23:36 -0400 Received: by mail-qk0-x22e.google.com with SMTP id a186so28073457qkf.0 for ; Tue, 21 Jun 2016 09:23:36 -0700 (PDT) Sender: Richard Henderson References: <20160618040343.19517-1-bobby.prani@gmail.com> <20160618040343.19517-15-bobby.prani@gmail.com> <06f042ba-91b2-d751-e53e-6e5ca56081d3@redhat.com> <108160aa-0789-67aa-cc42-01e4332b3581@twiddle.net> <7e333754-9755-dda5-143e-5a0c41ab9608@redhat.com> From: Richard Henderson Message-ID: Date: Tue, 21 Jun 2016 09:23:32 -0700 MIME-Version: 1.0 In-Reply-To: <7e333754-9755-dda5-143e-5a0c41ab9608@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3 PATCH 14/14] target-i386: Generate fences for x86 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Pranith Kumar , Eduardo Habkost , "open list:All patches CC here" Cc: serge.fdrv@gmail.com, alex.bennee@linaro.org On 06/21/2016 09:12 AM, Paolo Bonzini wrote: > > > On 21/06/2016 17:57, Richard Henderson wrote: >>>> >>>> || (prefixes & PREFIX_LOCK)) { >>>> goto illegal_op; >>>> } >>>> + tcg_gen_mb(TCG_MO_ST_ST | TCG_BAR_SC); >>>> break; >>>> case 0xe8 ... 0xef: /* lfence */ >>>> + tcg_gen_mb(TCG_MO_LD_LD | TCG_BAR_SC); >>>> + break; >>> >>> These are unnecessary. On the other hand, _each and every load_ must be >>> followed by a LD_LD | LD_ST barrier, and each and every store must be >>> preceded by a LD_ST | ST_ST barrier. >> >> They're not unnecessary if we (1) add those barriers for normal loads >> and stores and (2) omit them from the non-temporal loads and stores. > > When does TCG generate non-temporal loads and stores? I was talking about the guest non-temporal loads and stores. r~