Received: from eggs.gnu.org ([2001:4830:134:3::10]:57649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE97T-0001cw-4y for qemu-devel@nongnu.org; Sat, 18 Jun 2016 01:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bE97P-0006lg-1K for qemu-devel@nongnu.org; Sat, 18 Jun 2016 01:48:34 -0400 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:36685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE97O-0006lZ-Pv for qemu-devel@nongnu.org; Sat, 18 Jun 2016 01:48:30 -0400 Received: by mail-pf0-x22e.google.com with SMTP id t190so37051551pfb.3 for ; Fri, 17 Jun 2016 22:48:30 -0700 (PDT) Sender: Richard Henderson References: <20160618040343.19517-1-bobby.prani@gmail.com> <20160618040343.19517-15-bobby.prani@gmail.com> From: Richard Henderson Message-ID: Date: Fri, 17 Jun 2016 22:48:27 -0700 MIME-Version: 1.0 In-Reply-To: <20160618040343.19517-15-bobby.prani@gmail.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: Pranith Kumar , Paolo Bonzini , Eduardo Habkost , "open list:All patches CC here" Cc: alex.bennee@linaro.org, serge.fdrv@gmail.com On 06/17/2016 09:03 PM, Pranith Kumar wrote: > case 0xe8 ... 0xef: /* lfence */ > + tcg_gen_mb(TCG_MO_LD_LD | TCG_BAR_SC); > + break; > case 0xf0 ... 0xf7: /* mfence */ > if (!(s->cpuid_features & CPUID_SSE2) > || (prefixes & PREFIX_LOCK)) { > goto illegal_op; > } > + tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC); You need to duplicate the sse2 check if you split lfence from mfence. r~