From patchwork Wed Jan 8 14:08:38 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: 11323757 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 81D3B109A for ; Wed, 8 Jan 2020 14:10:16 +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 5E16820643 for ; Wed, 8 Jan 2020 14:10:16 +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="TB8AuHJM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E16820643 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 1ipC0u-00046i-VD; Wed, 08 Jan 2020 14:08:48 +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 1ipC0t-00046E-R6 for xen-devel@lists.xenproject.org; Wed, 08 Jan 2020 14:08:47 +0000 X-Inumbo-ID: 5ec384ac-3220-11ea-b7ff-12813bfff9fa Received: from EUR05-VI1-obe.outbound.protection.outlook.com (unknown [40.107.21.116]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5ec384ac-3220-11ea-b7ff-12813bfff9fa; Wed, 08 Jan 2020 14:08:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ThuAWbuyvaKvZHmtRN8lPCYFAHv8lSQdYqoxHIj0K761/QIZPlMJdefLBP8tmWEdWr02ACf9NG6obY/ky4ZOB9TaB3uHX5x3MIncoPysJeWcRn/zBR39AWK9jzA/gHv+9OMg861utWsLDZG7riRp9unV1R26ss4kU0xMf8XsaW0xwuXM04osWhFazplvc2xhtFwW4H2ns1ZU2n2dWK12JyEP7/icOAGYMkCNgg+zn7e6JR6blxamYzGm8NRAmIJeQqXOMUUpMr/Swpju1WTzcRDhkvTsKHqSbBmV5Yr7NKtBtIfu7N0A3SVpe4FzymVFXlgAdni00lV9VeZDFMpYKw== 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=iV7Etwd85xncHh8h3PvlemQtEvWeXHwIdFtd1Y5jAUI=; b=j/0OY+LgPm+ezbnnCGXqdmU7ak6FM0umGHPMk1Mg1qiWDkf6utOXYpNRKfSgqziKxlngNTE7b0MTiq8FtiRVOLYFssSNZ4GncLFsPXifphi+3z4NP/2AyMuqk5RO1JkFDOkqOQdvPhZ4CS+gHHisJwMMQKxF9KsDzdtLMVW/+hyOo6X6/y0RN0BMMkMLovM5e9Dj1B20l+ZenDUk7P3wGvrAx9JWUCM62pRATU2v0DDQOIx9jkkgGFwyOLrLkRJvWCPNlFE2ZTs0V2SHTHrgeOTsvdWkGLcEZZT5Z6bZPu+bezUShynKFe0exyeH8GdcTSnsCFeDOI5cRnGuw+ZqDQ== 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=iV7Etwd85xncHh8h3PvlemQtEvWeXHwIdFtd1Y5jAUI=; b=TB8AuHJMFY1g1vn4w+nWsDuAENFnHOI7nQey3pibeZf5Lraxs1AzgMettg0jgAK/4fEhfc0PQnceZYWocwssCk3ZuqHWl/EcgItE0Sq9NBRLy/vodhqdKt6Bb0D8jU/Yvm+UAG4/DIiyofjsSHUpuh2uIpTwoRN1IfGWVHREW5c= Received: from DB6PR02MB2999.eurprd02.prod.outlook.com (10.170.219.144) by DB6PR02MB3253.eurprd02.prod.outlook.com (10.170.221.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.12; Wed, 8 Jan 2020 14:08:38 +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.2623.008; Wed, 8 Jan 2020 14:08:38 +0000 Received: from aisaila-Latitude-E5570.dsd.bitdefender.biz (91.199.104.6) by AM4PR05CA0023.eurprd05.prod.outlook.com (2603:10a6:205::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.9 via Frontend Transport; Wed, 8 Jan 2020 14:08:37 +0000 From: Alexandru Stefan ISAILA To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH V7 3/4] x86/mm: Pull vendor-independent altp2m code out of p2m-ept.c and into p2m.c Thread-Index: AQHVxi0fbt+nN8/hdEK4zqWI7FQ36A== Date: Wed, 8 Jan 2020 14:08:38 +0000 Message-ID: <20200108140810.6528-3-aisaila@bitdefender.com> References: <20200108140810.6528-1-aisaila@bitdefender.com> In-Reply-To: <20200108140810.6528-1-aisaila@bitdefender.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM4PR05CA0023.eurprd05.prod.outlook.com (2603:10a6:205::36) 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: 19d1a749-9180-48d0-a6e4-08d7944441ff x-ms-traffictypediagnostic: DB6PR02MB3253:|DB6PR02MB3253: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:243; x-forefront-prvs: 02760F0D1C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(396003)(376002)(346002)(366004)(39850400004)(189003)(199004)(66446008)(16526019)(4326008)(66556008)(54906003)(8676002)(81156014)(66476007)(316002)(64756008)(81166006)(2906002)(6506007)(6512007)(6916009)(52116002)(26005)(186003)(66946007)(5660300002)(8936002)(36756003)(1076003)(956004)(2616005)(86362001)(478600001)(6486002)(71200400001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR02MB3253; H:DB6PR02MB2999.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: Zujc8p0vy5Pq2mO0WrvhDf+WpttvfmSAGSQkFZbwHGlqJ0+EQdQ1W6DqreWfFRGVoh01b5yGdtzYJAzwro3onMn50//X5gAG4ujhPNT2LYUPGBT5+0vPkWXuNd4gWG1yuOcnnv1ChbY+8HAS9T39ABjlAPLxIkJaWdsjFNAjUU1SuDEvMyvYnKKUtUHe64zEQGblK+kFShHieRmR9gSlPlXLZg6EiR17jEnPE08d73r/e4FJZOmZtBPLaJ1Cku3D2Banx7zsJisoZLHMGrmVouTMVmef8BP4AYnPen5dkpnR0ORAciFfSw2Z7hsi5BF+THWjNOouCXFSLR7vF1GF/AfVnluMrLT56frVuov8UcauyBk7C2VcfSqYs4SEySeF3m3jl+jaYHNbj1Ty/JAXspH79dXurRSUt/lEr1zHvGVV7h95zq4qi8PdOfmNWpAu Content-ID: <3F067D2C7894AE4EB7036F65C2866417@eurprd02.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: bitdefender.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19d1a749-9180-48d0-a6e4-08d7944441ff X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2020 14:08:38.3883 (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: tGHJzodaC8c3ZBf3l3IGOPm29/e3QrYivwPO6F9Xd+xPEHs4NzoY4eCgx93MIPR6jpgucLpElDZuyZaCrQNuCR+Iv3I7H8WBGRkP8WX4Eug= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR02MB3253 Subject: [Xen-devel] [PATCH V7 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: Kevin Tian --- 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 1c23ea6169..7f9d560df8 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -1359,13 +1359,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 223ca0cf4c..1befc06641 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -2564,6 +2564,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: