Received: from eggs.gnu.org ([2001:4830:134:3::10]:57721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4uIB-0000RB-KV for qemu-devel@nongnu.org; Thu, 10 Nov 2016 13:41:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4uI7-00019X-NT for qemu-devel@nongnu.org; Thu, 10 Nov 2016 13:41:43 -0500 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:38703) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4uI7-000188-G7 for qemu-devel@nongnu.org; Thu, 10 Nov 2016 13:41:39 -0500 Received: by mail-wm0-x231.google.com with SMTP id f82so49881974wmf.1 for ; Thu, 10 Nov 2016 10:41:39 -0800 (PST) Sender: Richard Henderson References: <20161109145748.27282-1-alex.bennee@linaro.org> <20161109145748.27282-20-alex.bennee@linaro.org> <8760nv8aq7.fsf@linaro.org> From: Richard Henderson Message-ID: <559c0b4e-def4-3eac-c994-47dd62b1e6c5@twiddle.net> Date: Thu, 10 Nov 2016 19:41:29 +0100 MIME-Version: 1.0 In-Reply-To: <8760nv8aq7.fsf@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v6 19/19] tcg: enable MTTCG by default for ARM on x86 hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, mttcg@greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, bobby.prani@gmail.com, nikunj@linux.vnet.ibm.com, mark.burton@greensocs.com, jan.kiszka@siemens.com, serge.fdrv@gmail.com, peter.maydell@linaro.org, claudio.fontana@huawei.com On 11/10/2016 07:13 PM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 11/09/2016 03:57 PM, Alex Bennée wrote: >>> This enables the multi-threaded system emulation by default for ARMv7 >>> and ARMv8 guests using the x86_64 TCG backend. This means: >>> >>> - The x86_64 TCG backend supports cmpxchg based atomic ops >>> - The x86_64 TCG backend emits barriers for barrier ops >> >> What tcg backend doesn't support what we need? For a weakly ordered target, >> any of our hosts should work. > > True, but this comes with certification that I've tested it. But you are > right adding this to configure is fugly. Should I just drop the backend > config symbol requirement totally? I was thinking that a good backend config symbol would somehow indicate the memory ordering strength of the host. Preferably in such a way that we can tell that host >= guest. I dunno if we assign ordinal numbers in some arbitrary way, or try something more complex such as x86_64) HOST_MTTCG_MO='TCG_MO_ALL & ~TCG_MO_LD_ST' Or maybe put this in tcg/*/tcg-target.h in preference to configure. Then enable mttcg if the host memory-order is a superset of the guest, (GUEST_MTTCG_MO & ~HOST_MTTCG_MO) == 0 r~