From patchwork Tue Nov 6 19:14:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 150349 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4274097ljp; Tue, 6 Nov 2018 11:17:24 -0800 (PST) X-Google-Smtp-Source: AJdET5dAa3JnUSmA/YtaY94GZ/rA+cf0Kn7WcXFZoK97wlHKuO2ka3PhQODvPjKZDRBSB6aLRVcf X-Received: by 2002:a25:4a05:: with SMTP id x5-v6mr9002485yba.267.1541531844802; Tue, 06 Nov 2018 11:17:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541531844; cv=none; d=google.com; s=arc-20160816; b=CmTEJbJzinqsX/wB1d8JKbzc2L6XPldJllryCvlr3XgCmdYB8V5XnXjC3cujzHZSqT N2bfw46t5eK6mh6I7zGdbINELPgrJG7fLlF2JLg1g4RqPo7Bx6L00BkuWIoUmBKhHbo2 tx0+DR9rTgaO5u7nd+GnfIcDxYoJyohUgC9VKRB40bL1GBi6rJucUo5nKZOAzRzXvZLT tnnJMz0L0RggA+8jUw28ihDGT46p6wC5Ggv9YS6mDUpzhc27rFrIDRa+LTP0Xns5u+QA TC6plbqNDePjUbECoAJj88CbPWZqhsLypztayFjIkIfun872jIo+svUuKoMzRfyjZeDT qTUA== 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=8laReRPUdNuxZNAmnUHpp4NVYoEAVOouLOQXJVmEXrw=; b=U4qFwLDv4pWXhg/VDabkQbUpWtSnB2oWL0T5/QS+35++IWz2Reqg5k7YuPal8SScxK h3QtpA26c8EJ/DpXzgXbx/tjrFSq2CGUMj2dZ9lLWKmqfkO5NcYxD0D27lAdgqTQz862 Qr3e5JkeU8gUZGGUbBNpPJhcJ9FlxO3vThZzurCtb4NrjBSqwayOtvG4Ldopc5LHKZ47 31Z8bhCNSXY5C/+AZwyNtfPeR9+fjtm/o5SR92VU7CBW/zueB+4nsRgfIQQnkYzvShOB 8wDv7JCay2t8qIe+1CwBw8wdD44v4MMMisiwCyek6oCqSPmvk8dpMoFTZGBmqvPpwUaQ /qpg== 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 r64-v6si3763901ywf.68.2018.11.06.11.17.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Nov 2018 11:17:24 -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 1gK6of-0003cI-Su; Tue, 06 Nov 2018 19:15:09 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gK6of-0003c1-8K for xen-devel@lists.xenproject.org; Tue, 06 Nov 2018 19:15:09 +0000 X-Inumbo-ID: 46317124-e1f8-11e8-9a16-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 46317124-e1f8-11e8-9a16-bc764e045a96; Tue, 06 Nov 2018 19:15:08 +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 95C151650; Tue, 6 Nov 2018 11:15:07 -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 CE23D3F718; Tue, 6 Nov 2018 11:15:06 -0800 (PST) From: Julien Grall To: sstabellini@kernel.org, xen-devel@lists.xenproject.org Date: Tue, 6 Nov 2018 19:14:49 +0000 Message-Id: <20181106191454.22143-4-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181106191454.22143-1-julien.grall@arm.com> References: <20181106191454.22143-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 3/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 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 --- 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 7a06a33e21..cec821c3a3 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -1283,7 +1283,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 04c8718e9f..b32b16cd94 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -440,7 +440,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 a5914136e3..5f7f31186d 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -117,7 +117,7 @@ enum p2m_type { 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 */ @@ -139,10 +139,10 @@ enum p2m_type { /* 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))) static inline void p2m_altp2m_check(struct vcpu *v, uint16_t idx)