From patchwork Mon Dec 23 14:04:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandru Stefan ISAILA X-Patchwork-Id: 11308261 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD41C109A for ; Mon, 23 Dec 2019 14:06:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 998C5206CB for ; Mon, 23 Dec 2019 14:06:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=bitdefender.onmicrosoft.com header.i=@bitdefender.onmicrosoft.com header.b="HmRdOjxi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 998C5206CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bitdefender.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ijOK9-0008Uu-G5; Mon, 23 Dec 2019 14:04:41 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ijOK9-0008Up-2c for xen-devel@lists.xenproject.org; Mon, 23 Dec 2019 14:04:41 +0000 X-Inumbo-ID: 28afbe52-258d-11ea-96db-12813bfff9fa Received: from EUR03-DB5-obe.outbound.protection.outlook.com (unknown [40.107.4.93]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 28afbe52-258d-11ea-96db-12813bfff9fa; Mon, 23 Dec 2019 14:04:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kLADuOy4/qO5QYvkHDqwsNF/jyq5Xkhu+F4zGKAjFf5y4taqXK4nKie9eh4JvNeFZp5v8KLATUz2gFIrGbSVZSbdeBjSfqRYcdMzUvhzoMyxIdLJTCbCGPrGTIadKL8/pEbYJCXxro1xuAA+irqOhFSH8sdYv95XrY+2PGt/Ok1Te0AL2YR1yN3A9WaYewZI1CHuQpmWCHOWUAClsikSikmpw/Th1K/mOtxMjeTCRm4Fr5YLV+TN8E+VhLG2gHZsJecNsTkCrxvJH/atBNaA3J6MWvVbx0M3WvXfCz0t3Dy5+gg8TuwO3RiHRJoLsuXg4Y7xvJiNLxU5zQgSwN0Y4g== 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-SenderADCheck; bh=IQFJylev6DCpsdMN2FnVo6t0vxDmyNzUTEnRdCtD3zA=; b=Rp/z8usLgkjAZUv+EDrUQTnVA9TEe+YS/JkSosiRIAKpsj3wR4+nlu/DRoFn8uP28JvGRMkByryO/NeVQM97ayUqg+fQtwZfSTpiCU/tbu2FOIVN3JcE55oq6AB3fxsM+lR4Bj9b7sgYTntoDcBGfK+9BAUYCpyb1Uky3l1tRXKs9jmsRVSXYqiNxAjOMyBdTd4vaXm7/IMNTdTcW6jQftmay3B9YbzqW9rdYz69YjrKFZ1lngrSX90qF5oDCikx+HZck0F04jEpxoVpV+XaGzmN/d2YtSXGr5yy6XKdNrJoFHCqGOk3auoR0Ibj61o15cdAZKQRZzuSiBPNXE7PDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bitdefender.com; dmarc=pass action=none header.from=bitdefender.com; dkim=pass header.d=bitdefender.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitdefender.onmicrosoft.com; s=selector2-bitdefender-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IQFJylev6DCpsdMN2FnVo6t0vxDmyNzUTEnRdCtD3zA=; b=HmRdOjxiwu8ojaQ/NH9bVjbCGaXLQZAsHcqFSC9+SVvUxnIYQCUrpYKfnDslOx6oMZxHGFoXi02WkilkjGX5dk+zJXGSvN3cEpmn8H9yvOQJ5wD4a3ZXVew1d7hjzdX4bktuzUgqOAOrMeWolh4juvrsw2a7m2oXnUW7vDorVvs= Received: from AM0PR02MB5553.eurprd02.prod.outlook.com (10.255.30.78) by AM0PR02MB5170.eurprd02.prod.outlook.com (20.178.22.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.14; Mon, 23 Dec 2019 14:04:38 +0000 Received: from AM0PR02MB5553.eurprd02.prod.outlook.com ([fe80::8cec:7638:734c:89d]) by AM0PR02MB5553.eurprd02.prod.outlook.com ([fe80::8cec:7638:734c:89d%4]) with mapi id 15.20.2559.017; Mon, 23 Dec 2019 14:04:38 +0000 From: Alexandru Stefan ISAILA To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH V6 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept Thread-Index: AQHVuZnpQDt7SsmM9ECzADswn1jViQ== Date: Mon, 23 Dec 2019 14:04:38 +0000 Message-ID: <20191223140409.32449-3-aisaila@bitdefender.com> References: <20191223140409.32449-1-aisaila@bitdefender.com> In-Reply-To: <20191223140409.32449-1-aisaila@bitdefender.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM3PR05CA0156.eurprd05.prod.outlook.com (2603:10a6:207:3::34) To AM0PR02MB5553.eurprd02.prod.outlook.com (2603:10a6:208:160::14) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisaila@bitdefender.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [91.199.104.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 13071b44-4f74-485d-af29-08d787b10c1f x-ms-traffictypediagnostic: AM0PR02MB5170:|AM0PR02MB5170:|AM0PR02MB5170: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:243; x-forefront-prvs: 0260457E99 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(136003)(366004)(396003)(39860400002)(189003)(199004)(81156014)(8676002)(81166006)(6506007)(66446008)(64756008)(66476007)(66556008)(66946007)(186003)(26005)(478600001)(8936002)(36756003)(4326008)(71200400001)(2616005)(2906002)(1076003)(6512007)(86362001)(5660300002)(54906003)(316002)(6486002)(52116002)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR02MB5170; H:AM0PR02MB5553.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: bitdefender.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xJ9YDb0u0UcUI8lMULI7HPp6hxwQdS/qF95oqLUU7S4KIb7CQxiPVQ1sPoFKWns0e7U1UaDWHRd9nzHDR6yVQtrlVdh7driTjrsAO1zDZpI6wwoZIGQ2sT8bV0zBoPEF4hr9flwOR30xWczdJk5QuvIPLxU3zs+7BsQIiXW1Mi2CHksfN/KHUZa1tY7j1sYdIYgZPCb2+LGVMkxtxSsVRVZ/AKa50PcKGLMbIWsWoMPQog0wR6VOZsaT0siFu2a83YgCQKUuPDe5Lcr2/UVgkO9ep1w81GghiRGGtZzzTR93xU//PTC38OmDaFoGiiCgipo5lS+s8AjZwdu/B86skXENzRo8oFKCCsDk6YmH/OcpqHNKjtX4pjh1LUgk29bSDo3Bn5a6CKBaM1Z5rBlVrnrZo1AtAfEQF7uYnQ1QIsaDSzlf0kRzSP0CEYyRQZLJ Content-ID: <8F2D2C75AB004F40AE14551D0CA6805B@eurprd02.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: bitdefender.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13071b44-4f74-485d-af29-08d787b10c1f X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2019 14:04:38.2276 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 487baf29-f1da-469a-9221-243f830c36f3 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aj1xs6c8bG32rgsPplK3jn37W7JP1B7UoVNyy/+O7EU345HPCvV69S5k9JkYEsj0Pmp0U/RkWaWTt461NgvdRk3SWBnIiuynrMZsBJZ84WE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR02MB5170 Subject: [Xen-devel] [PATCH V6 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept 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: Kevin Tian , Jun Nakajima , Wei Liu , George Dunlap , Andrew Cooper , Jan Beulich , Alexandru Stefan ISAILA , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Reviewed-by: Jan Beulich --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/mm/p2m-ept.c | 6 ------ xen/arch/x86/mm/p2m.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index b5517769c9..d861cd7b51 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -1357,13 +1357,7 @@ void p2m_init_altp2m_ept(struct domain *d, unsigned int i) struct p2m_domain *hostp2m = p2m_get_hostp2m(d); struct ept_data *ept; - p2m->default_access = hostp2m->default_access; - p2m->domain = hostp2m->domain; - - p2m->global_logdirty = hostp2m->global_logdirty; p2m->ept.ad = hostp2m->ept.ad; - p2m->min_remapped_gfn = gfn_x(INVALID_GFN); - p2m->max_mapped_pfn = p2m->max_remapped_gfn = 0; ept = &p2m->ept; ept->mfn = pagetable_get_pfn(p2m_get_pagetable(p2m)); d->arch.altp2m_eptp[i] = ept->eptp; diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index de832dcc6d..5b99d1eb97 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -2562,6 +2562,12 @@ static int p2m_activate_altp2m(struct domain *d, unsigned int idx) goto out; } + p2m->default_access = hostp2m->default_access; + p2m->domain = hostp2m->domain; + p2m->global_logdirty = hostp2m->global_logdirty; + p2m->min_remapped_gfn = gfn_x(INVALID_GFN); + p2m->max_mapped_pfn = p2m->max_remapped_gfn = 0; + p2m_init_altp2m_ept(d, idx); out: