Message ID | 20220124161312.38296-1-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <xen-devel-bounces@lists.xenproject.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12848C433F5 for <xen-devel@archiver.kernel.org>; Mon, 24 Jan 2022 16:13:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.259916.448697 (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1nC1yG-0001QB-3D; Mon, 24 Jan 2022 16:13:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 259916.448697; Mon, 24 Jan 2022 16:13:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1nC1yG-0001Q4-06; Mon, 24 Jan 2022 16:13:32 +0000 Received: by outflank-mailman (input) for mailman id 259916; Mon, 24 Jan 2022 16:13:31 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <SRS0=BDBv=SI=citrix.com=roger.pau@srs-se1.protection.inumbo.net>) id 1nC1yE-0001Pv-VJ for xen-devel@lists.xenproject.org; Mon, 24 Jan 2022 16:13:30 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9069033b-7d30-11ec-8fa7-f31e035a9116; Mon, 24 Jan 2022 17:13:29 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> X-Inumbo-ID: 9069033b-7d30-11ec-8fa7-f31e035a9116 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1643040809; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=yj/jG1xVfgrU/pPdzCgTgyhHbNBYErsWfaAudd38ZNk=; b=Tafr1tAktFkFivT3pgixPfQzrWt4Kh7NBFmWpvPZ1mh0UhzuG7YI1Fvp Y/K1wDUzstSu9We/7xTDRPbwPAKPCjU1fixqQh8In1usaxrArvNnKBH+4 g/wY21r7OP8Ylm+d+0dzPNzgZkiWuOgES5GoBdl6gwZ40r/2EdzrYqIDo w=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: 5J1XyW7jpxnKwvS4Hl1hgWRZvOekUtORXIdWyblPDbHRqUnAzFpS+OCiEA1Pb5XaemoC6tJEbT 4fsCoXipJV+BpvEydsi/Z9j86Aonnwh/e2IvqtS/79+hn8UcCW0eSie+W6E24mrKPyNro7seRm VvwNvxH8m/7zm3Mtvr/IYHyt37b22jnTDTgG+O8/ttd/5269Q+ZRdEIyN+oIw8d/ykYOQRK4ur KDD16seAs+pTgfZSrQkWM/pWPQP5vQAg7qMZAP9Yc7nIcCyqZ2FVjGDnV/yAsQFvcwEw4T6SDx qE54bN2O1hdiCfuSYlzk9dAs X-SBRS: 5.2 X-MesageID: 63046361 X-Ironport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SlXklXavoJBiKprzPLd MeTf01vJ1tABOnhjHizyNSKeWXLzsO9kzseDlAhiSXuwIm6UyRgXFohvD3pU1wha7VfaM0ld gsAp4Y6o2mcfVmHZ6VfN1xOfdfKla9Ni4kY1jiV2gOKsk8SgHwQtjMkfAI2N0= X-IronPort-AV: E=Sophos;i="5.88,311,1635220800"; d="scan'208";a="63046361" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=miygD46idXtazNb3cKXt1ZD3UKev3kuAvBeaBnbKXlKkULHDqPpN7FecGA0LzQi1I2eWQHGiHGQ8JC/CKnLaH7ySkSNj8oFmy3c9ykxhJd94e6YOidD7A8oo2f5XOHSAX1g38nXCinUw5mmCOJCQDhTGhB3kSlwQH9bJeaMZ/mU6KiWYh5Vpb6mtyQiMjTlkhCsUmwSCd/NVSfsxjl04GaaAmAgYKs7ov++B5p0Z130GSmeCZZK7S/WEOUiPUfASXvpigQdQCJVb52wg9McFxMU3513uRnjGHY6yZz+CFm1gj/jZ6KClRq4CpiWxESPib921nDyB2MC4zwR8V/v0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fDywZwv3SCqlZfNHbQvneXAQdtFlWktPZEYLJwrCW/k=; b=MKECp8V1iPB9ziwyZSEffYK1rZdfWLzKxnxDXjucj6AHxtMqH6FMXnyVTvfTWP3SMip/MUSkKfNeHeCzpSL45RahLS2/jJV8HOqayOvr8r4XojPlk2LqRF67HGHs7S6E/AtQ1sqLpQE3A+ajaWrpqtfthWcyWK6LwVCeYcwXEa3Wq2botc1V6bgeaCRHcOCuUJlwosuEGUfx0Dm7KQmjJAozq+iF9QNSlXvBrkHuPYrZ9q0OlY9HXKi/DRRRKlX5PTFhU3wzqkx7pvrop6AGblwyiV+089dvOP7vQRUvZDC3Sf051cOK1wUqniyqLph/17kjRZiDwXyDrPIh3ShCzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fDywZwv3SCqlZfNHbQvneXAQdtFlWktPZEYLJwrCW/k=; b=XZQ9Dxkgok4WKfAa5AITN6maqcThue8AQkK902P4GD9bZXpB6jBr1sNRLSlMmD5kjxCk0UOpXEOPyA+kPuPb4OHiDXeIW1kUZPqzJh31Xc0Tp5TlPfvf2ZeOoHZ3Zx2VQuUpJQI3X+f85kUVAhGXmUMEnESu7aDufd8Vk9cxlwM= From: Roger Pau Monne <roger.pau@citrix.com> To: <xen-devel@lists.xenproject.org> CC: Roger Pau Monne <roger.pau@citrix.com>, Jan Beulich <jbeulich@suse.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org> Subject: [PATCH v2] x86/pvh: fix population of the low 1MB for dom0 Date: Mon, 24 Jan 2022 17:13:12 +0100 Message-ID: <20220124161312.38296-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.34.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MR2P264CA0060.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:31::24) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eeacef23-8a04-40cd-8e23-08d9df54717e X-MS-TrafficTypeDiagnostic: DM6PR03MB4059:EE_ X-Microsoft-Antispam-PRVS: <DM6PR03MB40599045C7CB3E6753AD7FE38F5E9@DM6PR03MB4059.namprd03.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EoVrtGOM6pE/QvR8KZ6VVlEPeP1CqHC8i2PQ68ZFJorbJFUMHoGyGIm2EWQfUgTJ294P91gW/Hj2MoptmkuqgXmwe/bB0djh/Zl7SoIn2ptwerpfdiDDTFNAY8F+NdG+G3eYDJLHTippzVGqbWII66dv78WMwJ1ghk89wZhFveURl3yi/ue175ow6M7HNdpiVJ5C3P6jw+9BOfkuYShHIE2sxIdWfgVvhzb1b/+2Xbu7gB0fTMeVe3C9qzKwkG2QI+HVspxLKQ53GDRBlfwNCtqXJxMZhk6HJ9MaoYQCsBnLdX1kZ91V1zfQ8uagftRboWI6JiyNXToMIfa1ecxO6vUikdRFZgO80tEMWqwYumkgZdyp+7QavKKE6Ck6GUDCXRAt26/RH6FCOMz6GUbJtAMTY/BlCpQIWhgshnEBoU6b/6nM+/Wtr6N7D/sHlzV4qlIh7X4xSHJgmtmGpmJQn1mdoBnCqaJjMUI4cKM9fwXCsgfbBRS6VqRgB239uFNx0KfuICbo/pgeXM41oDwIJnuqTcwnYBDEgcQDUztG7OS2tUBJHHhtSdfDl4gkZ3Ah6lJW/FYgZwzA6+wu3n1keHDa2gbI1D+UrGmXhhRUsBEzO8mpQnTdXLEqqondcNhDo//82xr4ubovJGgDHuAfeA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(54906003)(2906002)(2616005)(5660300002)(83380400001)(316002)(36756003)(6486002)(1076003)(6512007)(8936002)(6666004)(6506007)(8676002)(186003)(66946007)(26005)(4326008)(66556008)(508600001)(66476007)(6916009)(86362001)(38100700002)(82960400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-Chunk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-8?q?5ekOgDmM70SpRmQHPOOnlKFup00xWq1Co++WT0epHWAtywy2borK1OrDBN7uH+RNn?= =?utf-8?q?3W4n0fhp0Q+TJnAPdRo5C92Hq94jTLOZPOxOB4GoYZ2rOqaInoqDLgr0sjESJZdFR?= =?utf-8?q?K2Nd33Am84rfhs/6/08fsnNcQln8UyTz5f9RwyMjdCY6IPECnA5adu3MBAUKKcy5H?= =?utf-8?q?aYxH0yaWJyaaRZ3suR5CLO9ZYw9wMyIwiBLutPkI8awYuHWSz2dLkdCm+pPQiuahH?= =?utf-8?q?EfSuBbdx5EvbZVxqh/IzP/orBBO2O6LAGSK3t+yGxpGDVgt49IsVYuE2tmLY/0RAK?= =?utf-8?q?6CIdNps7tGPej+YGlfEYXza9CuPEtJVt0L/xHxTuqFFB1CA9A/xNBQSwh9V2oxFb+?= =?utf-8?q?4dKT0vIKzJBToOatZ2E3e1oVfPJGBQYMWXzfBFdwizTMR0EwD0slHxXA/VCjPUnvm?= =?utf-8?q?M99EPkz9ZlTLWKHICK2lrCfWV1xGJgF9zRWDzUQjatUu6tDTlDr7kLu8l10sNUPJ6?= =?utf-8?q?BJhoYWwDAKbAPuB50mUHPBeIVtwJQdZZ4a2DsO/8QlwbK54NRYBBwKZC7UpPJMWvk?= =?utf-8?q?QmL++fRe8h6odPj1tDPaRotsX8mwwGuSH0YsFNbP/gH1v2n4h+EQWkNkb4SwJcqkY?= =?utf-8?q?jBGkqAtyWxsfcw65DmNLwdrEpuEW0429uXmib8fI4BGTq8GAfSVI2DFv5Aks4Y6GF?= =?utf-8?q?lxTo8EEf2skxCdb1ZwDxqa8zxXbFOMl79FRKE+qLJsaRmUI39rHCrXQ=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: eeacef23-8a04-40cd-8e23-08d9df54717e X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2022 16:13:22.5876 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EWG+COFerUATD78ii8JFVUF6h8t7hogMYqsKrsbiw9tYHRD3itd25KEI+uCDjGK+OVVkzR3bE3IarX477msbgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB4059 X-OriginatorOrg: citrix.com |
Series |
[v2] x86/pvh: fix population of the low 1MB for dom0
|
expand
|
diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index b00e45885c..63dceb2116 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -466,11 +466,16 @@ static int __init pvh_populate_p2m(struct domain *d) for ( i = rc = 0; i < MB1_PAGES; ++i ) { p2m_type_t p2mt; + mfn_t mfn = get_gfn_query(d, i, &p2mt); - if ( mfn_eq(get_gfn_query(d, i, &p2mt), INVALID_MFN) ) + if ( mfn_eq(mfn, INVALID_MFN) ) rc = set_mmio_p2m_entry(d, _gfn(i), _mfn(i), PAGE_ORDER_4K); else - ASSERT(p2mt == p2m_ram_rw); + /* + * If the p2m entry is already set it must belong to a RMRR and + * already be identity mapped, or be a RAM region. + */ + ASSERT(p2mt == p2m_ram_rw || mfn_eq(mfn, _mfn(i))); put_gfn(d, i); if ( rc ) {