From patchwork Thu May 30 07:59:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishnu Pajjuri OS X-Patchwork-Id: 10968333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B741192A for ; Thu, 30 May 2019 08:01:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A247328969 for ; Thu, 30 May 2019 08:01:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9615028AC2; Thu, 30 May 2019 08:01:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4093328969 for ; Thu, 30 May 2019 08:01:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hWFyc-0006S6-7O; Thu, 30 May 2019 07:59:54 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hWFyb-0006S1-91 for xen-devel@lists.xenproject.org; Thu, 30 May 2019 07:59:53 +0000 X-Inumbo-ID: e6904806-82b0-11e9-8980-bc764e045a96 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (unknown [40.107.72.101]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id e6904806-82b0-11e9-8980-bc764e045a96; Thu, 30 May 2019 07:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperemail.onmicrosoft.com; s=selector2-amperemail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nLQP1VADwRD8zmSUk1pyX56ZjfHt/x/uA8+4u279VhI=; b=ihrg69UfBePCxielYkL+KVTTfVjlMmpjkB+QLYh+Cu0w6G5UccE3kHkJZlvsjf98VJM0rCU1bJAa5wFwOCZSARtw24zl7nixn2+swVuT/v4bY1pQkav6wsBZytAFu3yr6BQ/o9xaIBNWoenX7nQ6tW9QXsRdvVeMuJ/t4Yike9Q= Received: from BYAPR01MB5590.prod.exchangelabs.com (20.179.89.32) by BYAPR01MB5190.prod.exchangelabs.com (20.177.185.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.17; Thu, 30 May 2019 07:59:46 +0000 Received: from BYAPR01MB5590.prod.exchangelabs.com ([fe80::20b6:929a:e8d8:7de7]) by BYAPR01MB5590.prod.exchangelabs.com ([fe80::20b6:929a:e8d8:7de7%5]) with mapi id 15.20.1922.021; Thu, 30 May 2019 07:59:46 +0000 From: Vishnu Pajjuri OS To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH v2] xen/arm: p2m: configure stage-2 page table to support upto 42-bit PA systems Thread-Index: AQHVFr2lcxcx0EO9ikSAfxMidE75jA== Date: Thu, 30 May 2019 07:59:46 +0000 Message-ID: <1559203823-4092-1-git-send-email-vishnu@os.amperecomputing.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: CY4PR08CA0039.namprd08.prod.outlook.com (2603:10b6:903:151::25) To BYAPR01MB5590.prod.exchangelabs.com (2603:10b6:a03:126::32) authentication-results: spf=none (sender IP is ) smtp.mailfrom=vishnu@os.amperecomputing.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.8.3.1 x-originating-ip: [4.28.12.214] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8b3e4eb1-692a-40c7-33ec-08d6e4d4c809 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR01MB5190; x-ms-traffictypediagnostic: BYAPR01MB5190: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 00531FAC2C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(136003)(39840400004)(346002)(199004)(189003)(4720700003)(6436002)(5640700003)(68736007)(66066001)(6486002)(86362001)(6506007)(386003)(99286004)(52116002)(14454004)(478600001)(54906003)(476003)(486006)(2351001)(2616005)(26005)(186003)(2501003)(316002)(3846002)(71190400001)(6116002)(25786009)(8936002)(71200400001)(2906002)(6512007)(50226002)(305945005)(4326008)(8676002)(7736002)(81166006)(5660300002)(81156014)(53936002)(102836004)(256004)(107886003)(6916009)(14444005)(73956011)(66946007)(66476007)(66556008)(64756008)(66446008); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR01MB5190; H:BYAPR01MB5590.prod.exchangelabs.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:0; MX:1; received-spf: None (protection.outlook.com: os.amperecomputing.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 1NVrbeFHPPld7S39gMiT3i/yVcgPYA03286jwcxgb/8AOqWyrJXeHR4P1NwPczSNst0qvk4IP6BW0+VoU9U47NsS4I8u36JJsYbbMkEQE2QJQbRs4U3XgO+GFGyalL2jxyoxAxQ0USrTB260tv4mnFpVPkRJAXbTUSmTiAzcXj7SUDKNfz4P6PlVaSqCPACeLyjMj9k9sURgay1sNu3XqHbkeewDH7Eld4010dY4YcUzlXW7d3rVvfPBSLcXyKB25dh/bdNFtSZ61s+nadQNrg0eFMj4ChuWsNHx618Y925Rzq67j1W5f9yXj0ptpW2wzWZwzGgJkDRO/F6fw+e3jeeQXPyhs0S52UuIjwg9aViMrNcNMfZw3G4vkGog5yWArEqHPrgeP7Zz6TQGMvwmpSn0EdMwbig4BUcac5dz7y4= MIME-Version: 1.0 X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b3e4eb1-692a-40c7-33ec-08d6e4d4c809 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2019 07:59:46.4986 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vishnu@os.amperecomputing.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR01MB5190 Subject: [Xen-devel] [PATCH v2] xen/arm: p2m: configure stage-2 page table to support upto 42-bit PA systems X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Open Source Submission , "sstabellini@kernel.org" , Feng Kan OS , "julien.grall@arm.com" , Vishnu Pajjuri OS Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP XEN configures stage-2 page table to expose 40 bits of IPA (Intermediate Physical Address) bits for systems with 42 bits of PA (Physical Address). This setting prevents the 42-bit PA systems from booting DOM0's kernel since access above 40 bits results in a fault. This patch adds support for 42-bit system which has a full 42-bit address range. The fix will allocate 8 pages for stage 2 mapping for both DOM0 and guests. It is a bit wasteful but not an issue since most of these systems should have sufficiently large memory capacity. Signed-off-by: Feng Kan Signed-off-by: Vishnu --- xen/arch/arm/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.3.1 diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 92c2413..7712991 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1995,7 +1995,7 @@ void __init setup_virt_paging(void) [0] = { 32, 32/*32*/, 0, 1 }, [1] = { 36, 28/*28*/, 0, 1 }, [2] = { 40, 24/*24*/, 1, 1 }, - [3] = { 42, 24/*22*/, 1, 1 }, + [3] = { 42, 22/*22*/, 3, 1 }, [4] = { 44, 20/*20*/, 0, 2 }, [5] = { 48, 16/*16*/, 0, 2 }, [6] = { 0 }, /* Invalid */