From nobody Thu Nov 6 08:24:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539741469516377.08255854039123; Tue, 16 Oct 2018 18:57:49 -0700 (PDT) Received: from localhost ([::1]:33387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCb5n-0004Dh-Sx for importer@patchew.org; Tue, 16 Oct 2018 21:57:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCb3B-0002WC-Ry for qemu-devel@nongnu.org; Tue, 16 Oct 2018 21:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCb3B-00071U-39 for qemu-devel@nongnu.org; Tue, 16 Oct 2018 21:55:05 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:35131) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCb3A-0006zx-NJ for qemu-devel@nongnu.org; Tue, 16 Oct 2018 21:55:04 -0400 Received: by mail-pl1-x643.google.com with SMTP id f8-v6so11891485plb.2 for ; Tue, 16 Oct 2018 18:55:04 -0700 (PDT) Received: from cloudburst.twiddle.net (174-21-9-133.tukw.qwest.net. [174.21.9.133]) by smtp.gmail.com with ESMTPSA id o133-v6sm24988124pfg.86.2018.10.16.18.55.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Oct 2018 18:55:01 -0700 (PDT) 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; bh=lPlCmjhSlEchq8CY/qrKQCDgXpsDA17ZVmRYlBXTejg=; b=DnuGfb+VhvG1uZaaEwrEtitDxiovhiiLpd90qv/5O0FB1ZTT9D0IHZ/uJJxJzuNxNO K4ZNhoSWXSqIQSaZfbQEv47F4xISefAqhSYuCWLypvI+xhyybJnUYAww0+7RiFYNKA+d VkD5HXszFyAJcMYVmnZYfmvXTJ9lKd5rCIAsY= 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; bh=lPlCmjhSlEchq8CY/qrKQCDgXpsDA17ZVmRYlBXTejg=; b=FhM3oyLcJUvybWQL1HVe4U8O3NTHMViVxWZXd4yX2SylzYSMKsDJOAVS+dwNXEvDPE l0OM3QvmNAyGsJ5yQE6TwIWKFEjUi1WkMESsk4A7SWoavtg9m6o0KrWk78WC8W+aAtWs miyQgbRFykZeDTYx1YUY2VKRM0ROuKHQqx9EpjQSKMVkVqRBjjLPefPuVvHMAE61yWjR +H8z7BbjTuOyf3ecaFEPPr9R+/lb0muZT0mnfWhfuSo06UATQMrtD0hdb/PnkaREislj yFjvUCoJ6SrTkx9AN1VUgmFPtCZ7+9OdHwGBMdjRpkwQG2BEgCYVPXszSTHWgaURKNzS ondQ== X-Gm-Message-State: ABuFfoiL1mSoAAtFy2X0PwTnMq9+vmqcpL9auLuM+Bn3YMUJHFp1+rMi qaru7cRZpULc/PhrbTYPeSxLwXi1v8A= X-Google-Smtp-Source: ACcGV60uITk05k1qp9IWN5+uFeg8wG7T5JVhWgL1oWaQlaWjCRtDIJ3OnxFnI2UvNB+ymjFfKxORDg== X-Received: by 2002:a17:902:9a07:: with SMTP id v7-v6mr23247556plp.14.1539741302885; Tue, 16 Oct 2018 18:55:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 16 Oct 2018 18:54:56 -0700 Message-Id: <20181017015456.3293-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181017015456.3293-1-richard.henderson@linaro.org> References: <20181017015456.3293-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 Subject: [Qemu-devel] [PATCH 3/3] linux-user: Align mmap_find_vma to host page size X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This can avoid stack allocation failures for i386 guest on ppc64 (64k page) host. Suggested-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 47950ee9d7..735bc928fe 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -262,6 +262,8 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size= , abi_ulong align) abi_ulong addr; int wrapped, repeat; =20 + align =3D MAX(align, qemu_host_page_size); + /* If 'start' =3D=3D 0, then a default start address is used. */ if (start =3D=3D 0) { start =3D mmap_next_start; --=20 2.17.2