From patchwork Thu May 23 14:43:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 165028 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2299427ili; Thu, 23 May 2019 07:53:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMM5eKgjoZd6EphsXKnK53lFTESmJOsI+QH2u68qOVQMNRd44sN7mUtwN7BqOYN3GS+Qe1 X-Received: by 2002:a17:906:6a90:: with SMTP id p16mr16068127ejr.75.1558623202614; Thu, 23 May 2019 07:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558623202; cv=none; d=google.com; s=arc-20160816; b=LR5OyZWJCCjT2BAYPHiZ/x2WkL42iqnuojdcT44iHr8OmenJb2j+5S77X6fY3Bqxzd Ka9bnTIfTntbAa4IdGhAhN4Eoa4aIi0JBKwRvLdztQQtAvliy9qPJh364AxgnKDdsmmr rna9+YlLNE980/W2u45lbZ/kCXqLCzLS0htrQM/yvS91Q9LKXngYr56e7IKUj34Gwfgs Yy9h6VgMAxrWVZMmjHjxVLxuYlAf6466AvNo1jQfM7a9+Cj7vrk2d2rl8WqkiPgk9tQY OQXbKkuO7J+10aUKnTi6ruqLq95Rlgg0pr30nGqC6WbajxUOqqUuZvta58w6oUvlDbZO buQQ== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=598f44TGDuB7IZvCNYslfKPq6sNaQzuRh2yw82YelaU=; b=jxnywi61EFYZQp6B0Yke0kmbOrnDQBI6L9y7mN+yt+Qy8+hayYy0Cl9YsgN/pMVrQG 4IZ/y+YBYNRCSQPPxSdIZuZKmVhB7bc9yRNgG9WeN+XLhgcHGf7c/ogRtetlbb1FsTLT OViYH26psC3Wp4qS4osm4qF0fWrZFU9oPUafJypKjWF+Tx3kK9u2XIj17w7zKRipfpKI dL6zq0fmwdy7fe44LCm90dtCLp99RLl+chap3VPSBDnTIBOccldql83CAYkANfp9Zd1z rK76DwF5hSJOnjk91Y9FMgfxfHbPaFasfZUIp49c8xFmMBIm2kzxND8zAtF7eLfdDCM9 Hvhg== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w54si6725342edd.124.2019.05.23.07.53.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 23 May 2019 07:53:22 -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; 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" Received: from localhost ([127.0.0.1]:38181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTp5t-0003Ly-It for patch@linaro.org; Thu, 23 May 2019 10:53:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTowv-0004E7-Tt for qemu-devel@nongnu.org; Thu, 23 May 2019 10:44:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTowv-0006EE-0V for qemu-devel@nongnu.org; Thu, 23 May 2019 10:44:05 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:51857) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTowu-0006Ct-Mc for qemu-devel@nongnu.org; Thu, 23 May 2019 10:44:04 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MtwEO-1ge4H12l8m-00uK7E; Thu, 23 May 2019 16:43:47 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 23 May 2019 16:43:35 +0200 Message-Id: <20190523144336.13960-10-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523144336.13960-1-laurent@vivier.eu> References: <20190523144336.13960-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:cs5dL+X0+zasUeXQvoPJVHhfkw/EwMe1R2voizKI35ZRlKPrz33 91yv08yz56F4EgYkfgadCkW+//Hf1Lj+n6l7znXrazaElkDBqPszz+q89EGpqeQDbMGHXqY D0Vtsi7X4y5t7k2lLJuUXnZSlEtd8OTkl/IvzC5TAj1xd0zHOkb0z5iWYEeAJHsLxsypbwV KiBnTwg+B5m1Mbnc7v0hQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:hUXmpm1N3uw=:VpozkE213P2bVP2P5vnXey r+tdpGI0VLHOAtyCdieEoe440MKAoaD9AuO7GTQBntGxUJN1/u9Imip9dtkKF+EsB9my6uN4+ 2oJEiZl1SZOsUofyf+EtphgcteF++sJscd3bhAbgasvLPmT+/M1T5P8yUStX2+psg5abWA6IU edMrvnhT9l47uZoQQgPsjOr4iMP10VVJoXUKoY1j+noPNF0VQOhlMxzqAK3fjhdUBBXfrHyEV BolUuyQMWg3rET5ncGuFkjVZSLyalHximClmhEVOMS5Jx0MBEeBB2csNRduJDoGdVXvLGkZPy gY22Vl9OCz56GJZ7PJliS5bbnzoyg/4ImNtXPqlIca+4tfZ6PuOdgjAvBGzIUeu3dluz7ww8f iIYd/kzygePbsG4Qa+t5bqp3hOsGntW1CNBe2wtM2GYrrS+PBoYjU+LhAzMVPWZsUfhOwSJaP zXMUaUnSSmOyHQr/0svRJRmvn4sJR9uUxmNV/QEqxmGls7tIPeBGBp/LRVNOoAglFBGVpT6+4 t7TIaoMT6L/P7RmH6S3hZ2aWDK12xIfHh98hG9RKmpsZvIwp0s8aX5X+/w60r8vFKJGiL+112 uPMqomiDQ3ppCVk3lTJvuzm+PvWzUgRcH4QDpt2PzmR+WucV11hf6ic8QKJ9JkrDyjrBG/jNt XIV43X6CXvN97aJI+qfOVJifao5DZrND6gCY6favGwtFq8+0Unv4ia9pbxC/GxKEZvezMv1ut +rg9udD7ir7ERr2Dvh5HtBGtHwYkR3zj3wvZTQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL 09/10] 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: Aleksandar Rikalo , Riku Voipio , Richard Henderson , Laurent Vivier , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson This can avoid stack allocation failures for i386 guest on ppc64 (64k page) host. Suggested-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20190519201953.20161-14-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/mmap.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 10796b37ac7b..af41339d576b 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;