From patchwork Thu Dec 20 19:23:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 154364 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp50620ljp; Thu, 20 Dec 2018 11:26:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/WL9cOzHEINcc2ptjt42TBUvpfDK3wPL42vCOWJmDf2gDbsyvPR+HlhDRYuM1jFrecFuIzb X-Received: by 2002:a0d:c484:: with SMTP id g126mr26884502ywd.151.1545333966796; Thu, 20 Dec 2018 11:26:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545333966; cv=none; d=google.com; s=arc-20160816; b=E7NLpUODIbO1Lce5TVYMHy/6GoM2BzGF25nJK+bBfPh5k/fG6hcMi5Lj7KEIlj+KbI Y7ju859Tl6KoxIUC5tf74d83dbbPFH266HwHybCF3OxH+zAsWBwQhRH+fz54739If1zi AppckhYP6aPGQetRTp1uicMDQdGTkMEsgCm3REM5ec/fUBYhdKJD3YIOmOTNGFYpTc3k VgXnYPn8dd2xcZwiJnKvIl/p4U8omGLXwk7NjJ4jeayDpTCnI84K0WNC2riSNkr7h9Wc Hx0oF2+Aa3rhVzTzPSbsD1AzdJusqPWZkNA0q2hERaJpvdP10f1FbdRlDXOYPzll07Wk kv5Q== 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=26e6PTJGeqLaCvQsYkK5gVhg917qlb9pYackKVrJkPc=; b=qppi/DEexoyGEDFHZavNKkUm7YOMPZ+4w9wHrvoyY3FGc9Stt5gdO7Gc6qnxDDJ8c0 zrO7zr/pDDhnduwumHaKyXhrulGsgOJ5X5X3GGtqEQgtZKOdFNg7Ag/XtroMZqGgBpHp uELLWM5bt6QBIhK2vNA38UY1i7XYkRWCu+GM0yKZM5WKoSt49cqtlFV8a6Lxjr3H6g6Y LegE/PJgQppSHwMA6KOJaEpt0Z1DXVwQ9xqe5/BBCTRAocufbwpzJlzXbk6D28M2zNBN HeNnzx2IHaGxsqY6z/yOnud1A0KYsHUeqUGFSnqo6BJddWxh0atDAfVPOq69WUBPcEm2 r8JQ== 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 62si991181ybb.351.2018.12.20.11.26.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 11:26:06 -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 1ga3vF-0001xK-Rj; Thu, 20 Dec 2018 19:23:53 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ga3vF-0001wz-3H for xen-devel@lists.xenproject.org; Thu, 20 Dec 2018 19:23:53 +0000 X-Inumbo-ID: c885f523-048c-11e9-8e1d-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id c885f523-048c-11e9-8e1d-bc764e045a96; Thu, 20 Dec 2018 19:23:51 +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 862A81650; Thu, 20 Dec 2018 11:23:51 -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 97A8E3F575; Thu, 20 Dec 2018 11:23:50 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 20 Dec 2018 19:23:33 +0000 Message-Id: <20181220192338.17526-4-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181220192338.17526-1-julien.grall@arm.com> References: <20181220192338.17526-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH for-4.12 v2 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 , 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 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 cd34149d13..e0b84a9db5 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -467,7 +467,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