From patchwork Fri Jan 17 13:31:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandru Stefan ISAILA X-Patchwork-Id: 11339025 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 82C2213A0 for ; Fri, 17 Jan 2020 13:32:47 +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 5D715206B7 for ; Fri, 17 Jan 2020 13:32:47 +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="D8kPQGEo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D715206B7 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 1isRiv-0004CR-3n; Fri, 17 Jan 2020 13:31:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1isRit-0004C7-Ff for xen-devel@lists.xenproject.org; Fri, 17 Jan 2020 13:31:39 +0000 X-Inumbo-ID: ad3aa048-392d-11ea-b833-bc764e2007e4 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (unknown [2a01:111:f400:7e1b::70f]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ad3aa048-392d-11ea-b833-bc764e2007e4; Fri, 17 Jan 2020 13:31:33 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fMJ7zACMW9zipM9JLRm1udhuVb/Nc+3U1J1QMvvgh7Aht1VnhffYusRMefJ2AsrIe1lV/LPGVoLO4qIRE415/s5btZyWKdYX4kuZ3nikD0E0IAtQUQsTnOsXkzzRKVnIgP2LY31HDh7036BxmgtEjrHhzhXRbRlPwa5RhY9r4PJUimRU1iCObdqA9LTvNEJQZ3dZtejvzRIKhiozfw6M3k3PRpZPFsZ/6XFy1ivgfXThRLkBefwpN9gvEF8jn2Zd42GURE5Rie//daSgEUqI+hDvlfzcpQ2aaRNE6qWNO1NDPfdNmSMdNvRwV4BXjB9xwZXGvXfbnCWvLENhH3+zRQ== 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=Zak+i1VwAM5Dez896o8r9BagCFc4u+w82IQ3EmvKg9M=; b=LcGVOkkrq65UDmjUZpCCpSLReJRCYeG+NAk9o0OlZK7A9ux/tv/TqgkOPkRwTwQ24kN/kOeNRyWhdBM4YYKSxwAjv5xqX9XFdqzYIqo9yG5vzkxSpH9yAPLfZR/j8+cvUtepXHc3Gfr/Ht7/MYRrvIwpIkVqI89H019lj2M0aDabdpqds4hUEVEIWLn3j62WxJ6vPEld0jqbhdgZw2iPOvmFH10ZUDXphcyW1np4MvndFtWbEC+36f+C693WcycCetLxB9vdTHIEITD55QY2NDE1XeN8xuyGdMK4Ze+dWMjDy6J07lA5QwHmeI5lvB9CSXYgGWjRIDCGhsmtxmT6hA== 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=Zak+i1VwAM5Dez896o8r9BagCFc4u+w82IQ3EmvKg9M=; b=D8kPQGEoIrptRSc1jhOr6aqduosoH+lJGtp4Y3/bYUwLXrG1bP91TDspmxEqQuq7HQzHRQhRPViGSSsksg1QZG6Prdj2TclM9fwAkmZgTt03aJ9rrR17USFfqQQIt/GDJx943GOg4/QlqQUnvT/kBgK/l8p+cxPs/C4KEJ5hylw= Received: from DB6PR02MB2999.eurprd02.prod.outlook.com (10.170.219.144) by DB6PR02MB3207.eurprd02.prod.outlook.com (10.175.234.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18; Fri, 17 Jan 2020 13:31:32 +0000 Received: from DB6PR02MB2999.eurprd02.prod.outlook.com ([fe80::f1c2:7dd1:1131:1c1d]) by DB6PR02MB2999.eurprd02.prod.outlook.com ([fe80::f1c2:7dd1:1131:1c1d%7]) with mapi id 15.20.2644.023; Fri, 17 Jan 2020 13:31:32 +0000 Received: from aisaila-Latitude-E5570.dsd.bitdefender.biz (91.199.104.6) by AM0PR0402CA0004.eurprd04.prod.outlook.com (2603:10a6:208:15::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20 via Frontend Transport; Fri, 17 Jan 2020 13:31:31 +0000 From: Alexandru Stefan ISAILA To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH V8 3/4] x86/mm: Pull vendor-independent altp2m code out of p2m-ept.c and into p2m.c Thread-Index: AQHVzTpu4N3BdlWD2E+51bjjxJHR2g== Date: Fri, 17 Jan 2020 13:31:31 +0000 Message-ID: <20200117133059.14602-3-aisaila@bitdefender.com> References: <20200117133059.14602-1-aisaila@bitdefender.com> In-Reply-To: <20200117133059.14602-1-aisaila@bitdefender.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR0402CA0004.eurprd04.prod.outlook.com (2603:10a6:208:15::17) To DB6PR02MB2999.eurprd02.prod.outlook.com (2603:10a6:6:17::16) 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: b4cc1fb3-506b-4d8c-51f9-08d79b5190ad x-ms-traffictypediagnostic: DB6PR02MB3207:|DB6PR02MB3207: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:243; x-forefront-prvs: 0285201563 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(396003)(366004)(136003)(39850400004)(199004)(189003)(71200400001)(1076003)(52116002)(956004)(2616005)(66476007)(66556008)(36756003)(66446008)(64756008)(54906003)(478600001)(86362001)(6486002)(5660300002)(4326008)(8936002)(316002)(16526019)(66946007)(81156014)(26005)(81166006)(186003)(6916009)(8676002)(2906002)(6512007)(6506007); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR02MB3207; H:DB6PR02MB2999.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: ZIh0uFhBI5T14mRJJbTl7jLEEdoe7So0nWou938hSvGIXOycTR6WcFl9aluT5PylByhIroUTm5WX9PHa+1PmxZpG+ZyLfi0PgA+sOK3pBlXmmY8Di0F5QIEi29V4KcHDGhnSOf6BWprUVrihXaHu4OeeOaGSHzNauY9GFjvutk3S5rfMwW8sh8UfYLnYWpKXHcZUK+FPrusep2WhNB6UYpHbmt8jYSf4/3IvfL1WS/puRZRREoKpFSa5FhATZz4jORuBoRtRMT4MzQdnLwB8Jb2+RW2nBDU+kRHb853w0JCJtbeOvCNCtp5niZK8vC9k7NPrgqi1RnIMh9CnwTjWKYvX11fV35KJSa1mglWQeVmIJdbnpFnioac/P2ib+qoPJ2If70obsbntD8ZhKB26gu0kPOA+1bdMBJkclIRqL40EGlKCEDeZvPc3xO7d+kV8 Content-ID: <2F84694402926F47815D097CD83A135B@eurprd02.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: bitdefender.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4cc1fb3-506b-4d8c-51f9-08d79b5190ad X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2020 13:31:31.9667 (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: AsoW9lVOMs2zE5je8hfHhmhsqb1QweSkXM8d3Lna2xYLjtSYVf1BCh054oaGM7675vVSkPLgEgvm0gxcIA5Wn7BBk0S/L1Ye1WUxsgd+SUg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR02MB3207 Subject: [Xen-devel] [PATCH V8 3/4] x86/mm: Pull vendor-independent altp2m code out of p2m-ept.c and into p2m.c 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" No functional changes. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Reviewed-by: Jan Beulich Reviewed-by: Petre Pircalabu Acked-by: George Dunlap --- 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 b078a9a59e..05a5526e08 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[array_index_nospec(i, MAX_EPTP)] = ept->eptp; diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 3a2929c365..696946697a 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: