From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Id4-0001OW-Jd for qemu-devel@nongnu.org; Fri, 27 May 2016 10:20:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6Icx-0002yP-Kl for qemu-devel@nongnu.org; Fri, 27 May 2016 10:20:45 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:33802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Icx-0002yE-CS for qemu-devel@nongnu.org; Fri, 27 May 2016 10:20:39 -0400 Received: by mail-lf0-x242.google.com with SMTP id 65so8659695lfq.1 for ; Fri, 27 May 2016 07:20:39 -0700 (PDT) References: <1464310815-13554-1-git-send-email-rth@twiddle.net> <1464310815-13554-11-git-send-email-rth@twiddle.net> <57482035.2010208@gmail.com> <87wpmfbn6a.fsf@gmail.com> From: Sergey Fedorov Message-ID: <574857B4.2030105@gmail.com> Date: Fri, 27 May 2016 17:20:36 +0300 MIME-Version: 1.0 In-Reply-To: <87wpmfbn6a.fsf@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 10/12] tcg/tci: Add support for fence List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar Cc: Richard Henderson , qemu-devel@nongnu.org, Stefan Weil On 27/05/16 17:17, Pranith Kumar wrote: > Hi Sergey, > > Sergey Fedorov writes: > >> On 27/05/16 04:00, Richard Henderson wrote: >>> diff --git a/tci.c b/tci.c >>> index b488c0d..53b3f71 100644 >>> --- a/tci.c >>> +++ b/tci.c >>> @@ -1236,6 +1236,9 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) >>> tcg_abort(); >>> } >>> break; >>> + case INDEX_op_fence: >>> + smp_mb(); >>> + break; >>> default: >>> TODO(); >>> break; >> A bit of bike-shedding. While there's no common ISA term for "memory >> barrier" (also known as a "membar", "memory fence", etc.), we already >> refer to it as a "memory barrier" (or "mb") in include/qemu/atomic.h and >> docs/atomics.txt. Why don't be consistent and avoid introducing yet >> another term for the same thing? >> > Fair point. Do you think tcg_out_mb() is better then? Yes, if used together with 'INDEX_op_mb', of course. Kind regards, Sergey