From patchwork Fri Dec 21 16:26:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 154410 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1117810ljp; Fri, 21 Dec 2018 08:29:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN4kJkFHL0BAXeIUeUt4ryOV2JR4OWQnCBvcbjIwwUew5PNLauuuT05F4twiZvRotDCcl2Qp X-Received: by 2002:a25:8446:: with SMTP id r6mr3142091ybm.474.1545409743313; Fri, 21 Dec 2018 08:29:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545409743; cv=none; d=google.com; s=arc-20160816; b=SjHyRLANOIsOoSkKjjCkYX6YBl3J2NPJd2niszYhVTCsn5i9M5YW+JFSMB4/kL4TBn eOE3X6FsO/jQ0k6CF+uU31Evh81sBL+fenLN46eux+vFqHyPbPS3hX/oOvBuElN+31zG 7Rw4h9ZNedMM0puGYspa4s9QhWyLzc5foCaYiMAqpcFWzos7dLIUT9H4f0RR7VW7vJRT iOpyFov0wlrCVzDMRj/4EPn4QHPztvAApCerPwT3gifZ6LIpehBaUQQ1PMqJ5YvWS34b GYYMWEIRw2UobRG+fKPtHrEXrk9ytcYTmRRc22o4SuuFdGzAcR5lrv18BTW9C+VsdwBg oMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=BhWeaRccV4Z2s570Bwwf97a4pt1D1JKLCMEDve4dTWI=; b=eWdbfPzP0rXG+egAK7b3jHZCWyuwdMKN2nr6L0Gg92N9qguz1RlWBIpUx1kSnYAur8 B4bmGjy6nqb3QZStAx6EOh7HOYd3QctaO/8fhS76u28xZxng0BFp/ikeWt3gMqNRqGy0 1FNqLb7OlFtk0XZuO/RUhmrsAoel0s1YqlH+1BDF5G/d+v/fYWWa2917aYCn/UoMvY7N 2nSXi6VO8RC2W5ymXYN7B1Lnx7Z8ECp9vJkCIP45JJo+8tMKcQ93jcasYgrVpDS3Nxal 8BK4CVgLS9H3ddKAcVLzvS4WfHrar+JOp88Oi4gztmlKjXQUGWwAY78Lhwpxec+0uSNq tR9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id l200si14619535ywb.58.2018.12.21.08.29.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Dec 2018 08:29:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) 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 1gaNdh-00067p-AC; Fri, 21 Dec 2018 16:27:05 +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 1gaNdg-00067Y-2s for xen-devel@lists.xenproject.org; Fri, 21 Dec 2018 16:27:04 +0000 X-Inumbo-ID: 3f780c00-053d-11e9-9ffd-cbe38b3e3cb3 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 3f780c00-053d-11e9-9ffd-cbe38b3e3cb3; Fri, 21 Dec 2018 16:27:02 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5A258EBD; Fri, 21 Dec 2018 08:27:02 -0800 (PST) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B3CD3F5C0; Fri, 21 Dec 2018 08:27:01 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Fri, 21 Dec 2018 16:26:44 +0000 Message-Id: <20181221162650.11515-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181221162650.11515-1-julien.grall@arm.com> References: <20181221162650.11515-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH for-4.12 v3 2/8] xen/arm: Rename p2m_map_foreign to p2m_map_foreign_rw 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: Julien Grall , sstabellini@kernel.org, Andrii Anisov MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" A follow-up patch will introduce another type of foreign mapping. Rename the type to make clear it is only used for read-write mapping. No functional changes intended. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov Acked-by: Stefano Stabellini --- Changes in v3 - Add Stefano's acked-by Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/mm.c | 2 +- xen/arch/arm/p2m.c | 2 +- xen/include/asm-arm/p2m.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index d96a6655ee..7193d83b44 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -1267,7 +1267,7 @@ int xenmem_add_to_physmap_one( } mfn = page_to_mfn(page); - t = p2m_map_foreign; + t = p2m_map_foreign_rw; rcu_unlock_domain(od); break; diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 7ae5b29699..89279fb590 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -468,7 +468,7 @@ static void p2m_set_permission(lpae_t *e, p2m_type_t t, p2m_access_t a) break; case p2m_iommu_map_rw: - case p2m_map_foreign: + case p2m_map_foreign_rw: case p2m_grant_map_rw: case p2m_mmio_direct_dev: case p2m_mmio_direct_nc: diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 4db8e8709d..a1aef7b793 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -115,7 +115,7 @@ typedef enum { p2m_mmio_direct_dev,/* Read/write mapping of genuine Device MMIO area */ p2m_mmio_direct_nc, /* Read/write mapping of genuine MMIO area non-cacheable */ p2m_mmio_direct_c, /* Read/write mapping of genuine MMIO area cacheable */ - p2m_map_foreign, /* Ram pages from foreign domain */ + p2m_map_foreign_rw, /* Read/write RAM pages from foreign domain */ p2m_grant_map_rw, /* Read/write grant mapping */ p2m_grant_map_ro, /* Read-only grant mapping */ /* The types below are only used to decide the page attribute in the P2M */ @@ -137,10 +137,10 @@ typedef enum { /* Useful predicates */ #define p2m_is_ram(_t) (p2m_to_mask(_t) & P2M_RAM_TYPES) -#define p2m_is_foreign(_t) (p2m_to_mask(_t) & p2m_to_mask(p2m_map_foreign)) +#define p2m_is_foreign(_t) (p2m_to_mask(_t) & p2m_to_mask(p2m_map_foreign_rw)) #define p2m_is_any_ram(_t) (p2m_to_mask(_t) & \ (P2M_RAM_TYPES | P2M_GRANT_TYPES | \ - p2m_to_mask(p2m_map_foreign))) + p2m_to_mask(p2m_map_foreign_rw))) /* All common type definitions should live ahead of this inclusion. */ #ifdef _XEN_P2M_COMMON_H