Received: from eggs.gnu.org ([2001:4830:134:3::10]:53505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4u9u-0007nL-Gj for qemu-devel@nongnu.org; Thu, 10 Nov 2016 13:33:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4u9p-0003CD-Ku for qemu-devel@nongnu.org; Thu, 10 Nov 2016 13:33:10 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:34481) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4u9p-0003B3-Et for qemu-devel@nongnu.org; Thu, 10 Nov 2016 13:33:05 -0500 Received: by mail-wm0-x243.google.com with SMTP id g23so4821767wme.1 for ; Thu, 10 Nov 2016 10:33:05 -0800 (PST) Sender: Richard Henderson References: <20161109145748.27282-1-alex.bennee@linaro.org> <20161109145748.27282-14-alex.bennee@linaro.org> <87wpgcmomy.fsf@gmail.com> <87eg2j8g7c.fsf@linaro.org> <2f256c7e-cd92-0678-db23-e269203a7164@twiddle.net> <87a8d78bbp.fsf@linaro.org> From: Richard Henderson Message-ID: Date: Thu, 10 Nov 2016 19:32:59 +0100 MIME-Version: 1.0 In-Reply-To: <87a8d78bbp.fsf@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v6 13/19] cputlb: atomically update tlb fields used by tlb_reset_dirty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: Pranith Kumar , pbonzini@redhat.com, qemu-devel@nongnu.org, mttcg@greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, 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, Peter Crosthwaite On 11/10/2016 07:00 PM, Alex Bennée wrote: > I should probably expand that to default to false in the case of (sizeof > target_ulong > sizeof void *) when we don't have CONFIG_ATOMIC64. > > Then if the user does force mttcg on they will quickly get an assert > although maybe we want to report that in a nicer way? While forcing mttcg is good for testing, small hosts will definitely fail, so there's not point in even trying. We should report it in a nicer way. We shouldn't be checking sizeof(void*), but checking TCG_TARGET_REG_BITS. That says how wide the host registers actually are, as opposed to the memory model in effect -- think x86_64 in x32 mode and the like. If the host register size is smaller than the guest register size, we should force disable mttcg, regardles of CONFIG_ATOMIC64, because e.g. normal 64 bit loads and stores won't be atomic. r~