From patchwork Thu Sep 11 15:21:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 37254 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C0BB20491 for ; Thu, 11 Sep 2014 15:23:51 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf38351647pab.4 for ; Thu, 11 Sep 2014 08:23:50 -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:from:to:date:message-id :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=VRC8kavI2dGWjDZ8gViAklYB94EBMJBgbyXfbq8Ie3o=; b=gx/7wGaY58Yd773SEwcbTFdsE4x2zdn8UM9EdGPn/Z6N+I5whYR9V6F1ZCzeQfySFf xU3jKIcTkrsBBbusCrSuiSsczb7bFz75etoA6mcxVo9SZsyr5KCg6QRyRYXQnA7Cnt1a lQHkbqjRfMZzmMLk7rp6qtX+VT/f2O9M+/S774sxcVTg8la+Z0lGreUqMCzXIsXo2GDh +5rvyu2Y/1tEYJwyD87vY0s9pOf2rAN1ZfZBdg9zsObZFxiEw4poELoxmprPusyqbvE7 u4ueszmGW6+iRuv+nFfkBJEVfMrIiC4vfdsTcsY0gKahgK2adtCqb0nDQmLUM2/3+puA tueA== X-Gm-Message-State: ALoCoQnCr24Fl0y9JU8OJ5Du9MKlAVhSD/Qz3kW+OPJhpstSx+H5spd2Zu+Uw8C78cBMkn2zW3Ah X-Received: by 10.66.66.46 with SMTP id c14mr785553pat.21.1410449030691; Thu, 11 Sep 2014 08:23:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.180 with SMTP id f49ls196572qgf.39.gmail; Thu, 11 Sep 2014 08:23:50 -0700 (PDT) X-Received: by 10.52.185.168 with SMTP id fd8mr1058120vdc.58.1410449030426; Thu, 11 Sep 2014 08:23:50 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id jq10si586928vdb.75.2014.09.11.08.23.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Sep 2014 08:23:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so6646819vcb.17 for ; Thu, 11 Sep 2014 08:23:50 -0700 (PDT) X-Received: by 10.220.187.134 with SMTP id cw6mr983981vcb.71.1410449030200; Thu, 11 Sep 2014 08:23:50 -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.221.45.67 with SMTP id uj3csp608846vcb; Thu, 11 Sep 2014 08:23:49 -0700 (PDT) X-Received: by 10.52.120.51 with SMTP id kz19mr719183vdb.95.1410449029790; Thu, 11 Sep 2014 08:23:49 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id fl8si582240vdc.92.2014.09.11.08.23.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 11 Sep 2014 08:23:49 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) 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 1XS6C4-00016i-SJ; Thu, 11 Sep 2014 15:21:56 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XS6C4-00016R-0j for xen-devel@lists.xen.org; Thu, 11 Sep 2014 15:21:56 +0000 Received: from [193.109.254.147:32462] by server-1.bemta-14.messagelabs.com id 40/73-24760-31EB1145; Thu, 11 Sep 2014 15:21:55 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-11.tower-27.messagelabs.com!1410448912!11622764!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.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 380 invoked from network); 11 Sep 2014 15:21:54 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-11.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 11 Sep 2014 15:21:54 -0000 X-IronPort-AV: E=Sophos;i="5.04,506,1406592000"; d="scan'208";a="171419468" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Thu, 11 Sep 2014 11:21:30 -0400 Received: from drall.uk.xensource.com ([10.80.16.71]) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1XS6Bd-0005GW-9o; Thu, 11 Sep 2014 16:21:30 +0100 Received: by drall.uk.xensource.com (sSMTP sendmail emulation); Thu, 11 Sep 2014 16:21:29 +0100 From: Ian Campbell To: Date: Thu, 11 Sep 2014 16:21:29 +0100 Message-ID: <1410448889-18731-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-DLP: MIA1 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH] xen: arm: configure correct dom0_gnttab_start/size 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) 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: Vexpress is currently failing to boot for me with: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0x118/0x1a4() CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.16.0-arm-native+ #276 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (warn_slowpath_common+0x5c/0x7c) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x18/0x20) [] (warn_slowpath_null) from [] (__arm_ioremap_pfn_caller+0x118/0x1a4) [] (__arm_ioremap_pfn_caller) from [] (__arm_ioremap+0x14/0x20) [] (__arm_ioremap) from [] (gnttab_setup_auto_xlat_frames+0x30/0xdc) [] (gnttab_setup_auto_xlat_frames) from [] (xen_guest_init+0x19c/0x2d4) [] (xen_guest_init) from [] (do_one_initcall+0xfc/0x1a4) [] (do_one_initcall) from [] (kernel_init_freeable+0x58/0x1b4) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xe4) [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 3406ff24bd97382f ]--- xen:grant_table: Failed to ioremap gnttab share frames (addr=0x00000000b0000000)! which is: /* * Don't allow RAM to be mapped - this causes problems with ARMv6+ */ if (WARN_ON(pfn_valid(pfn))) return NULL; This makes sense since the gnttab defaults to 0xb000000 and my dom0 is being allocated a 1:1 mapping at 0xa0000000-0xc0000000. I suspect this broke around the time we stopped forcing dom0 memory to be allocated as low as possible which happened to prevent the default dom0_gnttab region overlapping RAM. This patch specifies an explicit dom0_gnttab base which is explicitly unused according to the FVP model docs (although it correpsonds to CS5 this isn't wired up to anything). Signed-off-by: Ian Campbell Reviewed-by: Julien Grall --- This just fixes vexpress, I wonder if a followup patch should either remove the default dom0_gnttab (forcing all platforms to specify one explicitly) or make the default something less arbitrary than 0xb0000000, e.g. 0x0-0x20000 or 0xfffe0000-0x100000000 (very start or very end of RAM). Perhaps with a command line option to override for new platform hacking. Or maybe we should search for an unused hole in the dom0 RAM space? --- xen/arch/arm/platforms/vexpress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/arm/platforms/vexpress.c b/xen/arch/arm/platforms/vexpress.c index 8e6a4ea..ce66935 100644 --- a/xen/arch/arm/platforms/vexpress.c +++ b/xen/arch/arm/platforms/vexpress.c @@ -176,6 +176,8 @@ PLATFORM_START(vexpress, "VERSATILE EXPRESS") #endif .reset = vexpress_reset, .blacklist_dev = vexpress_blacklist_dev, + .dom0_gnttab_start = 0x10000000, + .dom0_gnttab_size = 0x20000, PLATFORM_END /*