From patchwork Sun May 19 20:19:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164488 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4776239ili; Sun, 19 May 2019 13:34:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJbpAhEdPqKUV97KbKeCqamEdkMALTN+FdFGnRJiSPeYtAX1AkXzcX4EKw5HaEFHSp37vA X-Received: by 2002:a17:906:7709:: with SMTP id q9mr55686420ejm.288.1558298097023; Sun, 19 May 2019 13:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558298097; cv=none; d=google.com; s=arc-20160816; b=DnWDgh7WRtv9HVl5OK77GsCtQ5Jw6jZV7vwEuR57oWCK/vmvO5PtwYbB7gKRYkKxTh UwGZJ7Bh6UejTrOndJk3FfhHKojMyA6c/gyADW2jemy61Ojic0lSVX6Xm8mPJrAvtqHN eeORN/i5273s3IvvTU4dVxZN9x5KvWocHxJMCgBujHAyMoZBI2wKm2bIRqz4r6uRF/fE JfdJWqa7CvP0gDkf/HOem8j9md8VyNR19yMRvzEVS7MTIcMdXJd7hk9uSDZcrQYJYaJQ 6K0chmt1qKP1ZcVQ55Vo1t50Rn/+udKrCLNVcj2oNFMcLldfGchVS49BUfZbSjAaDUWp eZGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=vXq6cXFo3n3RVYR19bI6vVgQuVdOYZC397oTA+hZL94=; b=kib/s6f1eunyzo25pHCCsynHKw4pC2GJZHBjXeE4MMwuS+yoS7xxo8HJFfaavDCd7r 1yGRk+Slct2pvlU9vPk8VFkZKWCwTxDAzqbFeDawxz2NqgGPkmjzDpGqD2aRPArcdTTV 1xBJ3bUfpQh1vvCrh1nsOVE4Yt/pKUCpG8oaeo2wrNeeBKNBGLo9mt/5Zkqfzo58C4em vVGn6sAAO7tn70yvzOmNS1E/UnQzkOQRj9svQwOhQY2yqHhSP6x2pETGqjPGAdDvz0Xa VLClUqgaZROCLTVFdx2v6eoWvxtcSOh32DXg/4Ssth+sf3/6iQjZbFGWM+llxJ+i0Juc 8irQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="h/5t8SuJ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c18si1152293ejf.102.2019.05.19.13.34.56 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 May 2019 13:34:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="h/5t8SuJ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:53047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSSWF-0000fy-WA for patch@linaro.org; Sun, 19 May 2019 16:34:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSSI8-0005qE-U0 for qemu-devel@nongnu.org; Sun, 19 May 2019 16:20:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSSI4-0007mU-AQ for qemu-devel@nongnu.org; Sun, 19 May 2019 16:20:19 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:42850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSSI2-0007hi-Fm for qemu-devel@nongnu.org; Sun, 19 May 2019 16:20:14 -0400 Received: by mail-pf1-x441.google.com with SMTP id 13so6147608pfw.9 for ; Sun, 19 May 2019 13:20:14 -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=vXq6cXFo3n3RVYR19bI6vVgQuVdOYZC397oTA+hZL94=; b=h/5t8SuJPF66yPg5KIK/1+q6l/zoXStcVF83BnUmASs+IJyugUpLxXyx5pkEHO2hpM H60lx4VC1JmsMfBFxLoFBP/dDHmB4KUBE1wAm2POAJVNHffSISkK3n1K1/PW6X9dgoSt oi42aOs3OfIIss0p1G0wVS2nKOrqanShKyLZ88xgPkyo8JQji5K5/SWyW0OWBDF4MfSP 52VOditXiH+azKus5npX8TUrWWLx9+/RZGT489fFhCzdhXVjTBb0gyQpfbXS83HotV3w TEL56sGRpuijYhDzz3evCXg1VSkd8WbNutAO/vNp8ED01h9N2n9mUyJa3PRMkvpnk6QD x3ZA== 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=vXq6cXFo3n3RVYR19bI6vVgQuVdOYZC397oTA+hZL94=; b=YHtAbUFEITZskA8tWuXYnQY8Blc+18qzGHDIxDMILaZ/HBl/Y9K8yYGIcm+3QpK2J+ gSNs2rigz/0ktmGlJoX8HJsE5YwaK2Qc9lkHSLJ0utwuVF5w8R75Xvu3DxzvwQbdlIlZ /bk1pE+0qzl/s8X9a1Z+xz77G1UyvLLJj3MZC8hupFesMpSaXVS0Boj1vx4qR8Mojst+ TOsjQ/u4tMmNCxHCPB+U+8bzmrMtJS9oXERsrz2yQ+x09fgaJhHBqAoKYzye/n2ZS6KA myQUta9EBE2io8XcZhfOuM7ZvjqIwLGa0sL5/xSuSC56ozbLholmrTd5uoGTxSUKtiWi QMlA== X-Gm-Message-State: APjAAAUKjStjMbwXxyHTjVT13q2QkwPVKOegQ9ev1p/D7+K3x3p4Nddo f2jKKz7koYghwIMWp2zKNZy8zghcDRI= X-Received: by 2002:a63:1e4d:: with SMTP id p13mr71552853pgm.125.1558297212217; Sun, 19 May 2019 13:20:12 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id e14sm18166264pff.60.2019.05.19.13.20.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 13:20:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 19 May 2019 13:19:53 -0700 Message-Id: <20190519201953.20161-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190519201953.20161-1-richard.henderson@linaro.org> References: <20190519201953.20161-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::441 Subject: [Qemu-devel] [PATCH 13/13] 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(+) -- 2.17.1 diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 10796b37ac..af41339d57 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; + align = MAX(align, qemu_host_page_size); + /* If 'start' == 0, then a default start address is used. */ if (start == 0) { start = mmap_next_start;