From patchwork Wed Aug 7 00:23:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 11079719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34765912 for ; Wed, 7 Aug 2019 00:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18EF528837 for ; Wed, 7 Aug 2019 00:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C05C2883F; Wed, 7 Aug 2019 00:24:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A265928837 for ; Wed, 7 Aug 2019 00:24:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hv9jX-0004do-7Y; Wed, 07 Aug 2019 00:23:15 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hv9jW-0004dX-49 for xen-devel@lists.xenproject.org; Wed, 07 Aug 2019 00:23:14 +0000 X-Inumbo-ID: 8a9f5071-b8a9-11e9-8980-bc764e045a96 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 8a9f5071-b8a9-11e9-8980-bc764e045a96; Wed, 07 Aug 2019 00:23:12 +0000 (UTC) Received: from sstabellini-ThinkPad-T480s.xilinx.com (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38E33214C6; Wed, 7 Aug 2019 00:23:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565137392; bh=jDipdn+4VUYW2qZ4ApT2mSbJxsiNklXhSAwqKIj+xQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yUnkcD3+V5WHqogYv3QNC6vpxa1WpIM2Gs0r7tKjsSz25Zf0Mxj7I1RTzk/wAG61O r33G3Yjo8WopagOwTTdqArqeMJdkGJTT9mBKSnKqOa5qldtD5/aDTm8itSeM7Z0n0D h3wvKfrSPdjAHfi0C3ibXUctEEViDU/SQ2W2Dkh8= From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Tue, 6 Aug 2019 17:23:06 -0700 Message-Id: <20190807002311.9906-1-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [Xen-devel] [PATCH v4 1/6] xen/arm: introduce p2m_is_mmio 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: Stefano Stabellini , julien.grall@arm.com, sstabellini@kernel.org MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add a p2m_is_mmio macro for easy checkings. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall --- xen/include/asm-arm/p2m.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 03f2ee75c1..31902317da 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -132,6 +132,11 @@ typedef enum { #define P2M_RAM_TYPES (p2m_to_mask(p2m_ram_rw) | \ p2m_to_mask(p2m_ram_ro)) +/* MMIO types */ +#define P2M_MMIO_TYPES (p2m_to_mask(p2m_mmio_direct_dev) | \ + p2m_to_mask(p2m_mmio_direct_nc) | \ + p2m_to_mask(p2m_mmio_direct_c)) + /* Grant mapping types, which map to a real frame in another VM */ #define P2M_GRANT_TYPES (p2m_to_mask(p2m_grant_map_rw) | \ p2m_to_mask(p2m_grant_map_ro)) @@ -146,6 +151,7 @@ typedef enum { #define p2m_is_any_ram(_t) (p2m_to_mask(_t) & \ (P2M_RAM_TYPES | P2M_GRANT_TYPES | \ P2M_FOREIGN_TYPES)) +#define p2m_is_mmio(_t) (p2m_to_mask(_t) & P2M_MMIO_TYPES) /* All common type definitions should live ahead of this inclusion. */ #ifdef _XEN_P2M_COMMON_H