From nobody Tue Dec 16 03:20:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582917958; cv=none; d=zohomail.com; s=zohoarc; b=NyGEtJkm+8g9MlImxzcjf/niUXEBp3lTQ3H6MkmOPx60u9fmAbTvj1Y+BcMKDxamfTTudXNeb6PefQZc+fw33wvPaXWQ+C6wzBjk1xCtCOKjy+WUOrJrlxf0Zob/M7vo9hdvE8lrDMkLqDazuj3XNjtTjjeVwgA3i2TOEYtjnB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582917958; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qwNAqRvi6iGMEY7tiLR6IKWg1Rzq0J9dU0xZ2yHjmzk=; b=adtbqASM+5s/JmliKWy1QfvlZH04hkhYvjcK5K22+es2obNuQ4SxQjK6dF0LzuloRCKGpFWGXqmiisUZWCPW3+OjyLi+xSiiRHrjiJ92N3n4VJm+H1VXYn/47smeo7pPVnaKgK0BomTwv0v8v2xlIJ7Jy5bZmOfaDto/z1g+As8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582917958806681.65844575788; Fri, 28 Feb 2020 11:25:58 -0800 (PST) Received: from localhost ([::1]:52974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7lGn-0005P9-J1 for importer@patchew.org; Fri, 28 Feb 2020 14:25:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40219) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7lFI-0003Z4-M3 for qemu-devel@nongnu.org; Fri, 28 Feb 2020 14:24:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7lFH-00062x-Kt for qemu-devel@nongnu.org; Fri, 28 Feb 2020 14:24:24 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:36298) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7lFH-00061g-Ev for qemu-devel@nongnu.org; Fri, 28 Feb 2020 14:24:23 -0500 Received: by mail-wm1-x344.google.com with SMTP id g83so2293214wme.1 for ; Fri, 28 Feb 2020 11:24:23 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c2sm3414429wma.39.2020.02.28.11.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 11:24:18 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AF0FE1FF90; Fri, 28 Feb 2020 19:24:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qwNAqRvi6iGMEY7tiLR6IKWg1Rzq0J9dU0xZ2yHjmzk=; b=Y2/Kdq6ymA20vwIqp+ohfD/kYkY58CAGrLwDuyiuNDCH6K9WUiTgkJpu5sZI0qzH0S QqnF5qZ8AuPCZFYYpSV1DIB2LtB1uS9XfZQPXsVAtq4saIUakbqPrd4Zhycf6ilRXVAp CKrfaTKKOhhPMvZWFn/3Qo6rK/axje+MXEFjMTjoJ2oqtY7IR1Sayf3a3yiqJuHUqAeT TClmJ8wYxHnWZn+7ElMzTFCrh6VwN8dOuhnZHX16ZL5k85YinbSYDVFBUNRteY6zKqyO H0D9l7C16f8lcKi/KMwAHryEIMsHM51bXwCKvTI3IFWxA4TdWY6kWeAj0pyLeVJ99PJo UD0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qwNAqRvi6iGMEY7tiLR6IKWg1Rzq0J9dU0xZ2yHjmzk=; b=mSxSLIzIMGCFYe0X4OuJfgZvcx7yC64IkuBz9uVZm2NDvQeoQAPeL0nxMVh+PJqRp0 R82elX3iYiKtNsUltrCdbZdOagGGE/R/hqV92iipMpZV8OPxZ2e/NGVd0uPvKfQZ95ki tCXiWCh702zRIjkiAPsWUSKbx0CkGe2tRejEKrcUW3QZNURaHKQabPsCwuLVdxsSLgDh aOhgMpuyn9Pa6cLNlXhx488wQ+awvjTvy03dC0nrAR7lNe3d33mw5MQPbto3V6f1yw/r j2BoqnhulkgdTkyKVLSTMxk9SNLQhMG0ISAmUyZkORW3K3xQzBiQcKtZZi7VAK+GBjQs Uajg== X-Gm-Message-State: APjAAAUex9hHfXXjZgIauhqtYps7LhoerAjQeT0IGK3PnGtKAiTIlj+h 5p8otNSFVUhm9yBke/5BAPkMEg== X-Google-Smtp-Source: APXvYqxdkk3tJqQi7DWRlMHefTfzVFtk7TMxi5+MVkrFHba/dZlDZmiRyPd0ApaXKOMdlFGKMyhV0Q== X-Received: by 2002:a1c:1d90:: with SMTP id d138mr5906030wmd.163.1582917862533; Fri, 28 Feb 2020 11:24:22 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 3/4] accel/tcg: only USE_STATIC_CODE_GEN_BUFFER on 32 bit hosts Date: Fri, 28 Feb 2020 19:24:14 +0000 Message-Id: <20200228192415.19867-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200228192415.19867-1-alex.bennee@linaro.org> References: <20200228192415.19867-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Niek Linnenbank , qemu-arm@nongnu.org, Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) There is no particular reason to use a static codegen buffer on 64 bit hosts as we have address space to burn. Allow the common CONFIG_USER case to use the mmap'ed buffers like SoftMMU. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Niek Linnenbank --- accel/tcg/translate-all.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 5b66af783b5..4ce5d1b3931 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -892,11 +892,12 @@ static void page_lock_pair(PageDesc **ret_p1, tb_page= _addr_t phys1, } } =20 -#if defined(CONFIG_USER_ONLY) -/* Currently it is not recommended to allocate big chunks of data in - user mode. It will change when a dedicated libc will be used. */ -/* ??? 64-bit hosts ought to have no problem mmaping data outside the - region in which the guest needs to run. Revisit this. */ +#if defined(CONFIG_USER_ONLY) && TCG_TARGET_REG_BITS =3D=3D 32 +/* + * For user mode on smaller 32 bit systems we may run into trouble + * allocating big chunks of data in the right place. On these systems + * we utilise a static code generation buffer directly in the binary. + */ #define USE_STATIC_CODE_GEN_BUFFER #endif =20 --=20 2.20.1