From patchwork Thu Apr 3 16:57:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 27697 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 04DB720490 for ; Thu, 3 Apr 2014 16:59:19 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf6847775pdj.7 for ; Thu, 03 Apr 2014 09:59:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:from:to:date:in-reply-to :references:organization:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=hHLvRilrXOUSZJBOxn+zI8LEIzmSi7Wyt8OcIZENR/k=; b=l+HdBuThg+BPCRnk6rD6ZTkpoN55D4DlNSWWHKKpboiYOr2C8cWxRdkPO4BMO/PzRX pdsdmJVpm3Jp3gjxBKc0uNM/TWdUfnJ6Ui1/W4yYHdBuE+X6c5xc0V00VTG9YzMF3PDb SJQaoE9rt4nXMm/y3xcLDPOndHtpX+84Ruqd2Jtr+4BKjXzi1cTghiUrJGuaT5yrqKVX m+lJ0X51QDvQKcRO0MsiDyAh7DOYb6sTLqEA7zv/BmWkddmk6+Sn0ZPc0cO2lcwuAf8a NRyXw0QlDKSoN3Yi6+f6aSQRUWWvVnzLa9f7ZQb453AnAHwVgzQUvccKKfP8P9xxd/NS onew== X-Gm-Message-State: ALoCoQnpO5dIHiO0RxGGQ58iouM22o0pV0ipbzvuxoMrYRpv/8wIHzA4QPnfsLqYTEf61DU+8pM8 X-Received: by 10.66.189.163 with SMTP id gj3mr1608970pac.32.1396544359033; Thu, 03 Apr 2014 09:59:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.163 with SMTP id b32ls705809qge.22.gmail; Thu, 03 Apr 2014 09:59:18 -0700 (PDT) X-Received: by 10.58.31.136 with SMTP id a8mr495856vei.20.1396544358933; Thu, 03 Apr 2014 09:59:18 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id 10si1317244vcu.186.2014.04.03.09.59.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 09:59:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu19so2221887vcb.1 for ; Thu, 03 Apr 2014 09:59:18 -0700 (PDT) X-Received: by 10.58.122.164 with SMTP id lt4mr484546veb.2.1396544358852; Thu, 03 Apr 2014 09:59:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp44565vcv; Thu, 3 Apr 2014 09:59:17 -0700 (PDT) X-Received: by 10.140.86.166 with SMTP id p35mr8129972qgd.81.1396544357530; Thu, 03 Apr 2014 09:59:17 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id q105si2391845qgq.170.2014.04.03.09.59.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 03 Apr 2014 09:59:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WVkx1-0001UN-5D; Thu, 03 Apr 2014 16:57:15 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WVkx0-0001UI-8S for xen-devel@lists.xensource.com; Thu, 03 Apr 2014 16:57:14 +0000 Received: from [85.158.139.211:52936] by server-16.bemta-5.messagelabs.com id 78/20-19700-9E29D335; Thu, 03 Apr 2014 16:57:13 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1396544231!5335933!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20669 invoked from network); 3 Apr 2014 16:57:12 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 3 Apr 2014 16:57:12 -0000 X-IronPort-AV: E=Sophos;i="4.97,788,1389744000"; d="scan'208";a="116515547" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 03 Apr 2014 16:57:10 +0000 Received: from [10.80.2.80] (10.80.2.80) by FTLPEX01CL01.citrite.net (10.13.107.78) with Microsoft SMTP Server id 14.2.342.4; Thu, 3 Apr 2014 12:57:09 -0400 Message-ID: <1396544228.4211.146.camel@kazak.uk.xensource.com> From: Ian Campbell To: Date: Thu, 3 Apr 2014 17:57:08 +0100 In-Reply-To: References: Organization: Citrix Systems, Inc. X-Mailer: Evolution 3.8.5-2+b3 MIME-Version: 1.0 X-Originating-IP: [10.80.2.80] X-DLP: MIA2 Cc: Julien Grall , Tim Deegan , Stefano Stabellini Subject: Re: [Xen-devel] [Xen-staging] [xen staging] Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround" X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On Thu, 2014-04-03 at 16:33 +0000, patchbot@xen.org wrote: > commit 1be5c1947fd52f5faaf6b678a829d47b0ec88bfd > Author: Ian Campbell > AuthorDate: Wed Apr 2 13:03:36 2014 +0100 > Commit: Ian Campbell > CommitDate: Thu Apr 3 17:15:41 2014 +0100 > > Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround Julien has just noticed that this breaks boot on the Midway systems. The obvious fix broken the boot on 64-bit instead so for now I've reverted the revert and I'll look into this properly tomorrow. The unrevert is below, I've already pushed it. -----8<------------------ >From d6ca80e03cc062c984401aefba5e277a9d9139a0 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 3 Apr 2014 17:54:34 +0100 Subject: [PATCH] Revert "Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround"" This reverts commit 1be5c1947fd52f5faaf6b678a829d47b0ec88bfd, effectively reinstating 6c21cb36e263de2db8716b477157a5b6cd531e1e. Without this booting dom0 on systems with >4GB of RAM is broken because the guest gets allocated a memory range which it cannot access. Signed-off-by: Ian Campbell --- xen/arch/arm/domain_build.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index a0b73d2..502db84 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -69,12 +69,19 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo) { paddr_t start; paddr_t size; - struct page_info *pg; + struct page_info *pg = NULL; unsigned int order = get_order_from_bytes(dom0_mem); int res; paddr_t spfn; + unsigned int bits; + + for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ ) + { + pg = alloc_domheap_pages(d, order, MEMF_bits(bits)); + if ( pg != NULL ) + break; + } - pg = alloc_domheap_pages(d, order, 0); if ( !pg ) panic("Failed to allocate contiguous memory for dom0");