Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755336AbcKONLt (ORCPT ); Tue, 15 Nov 2016 08:11:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38326 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754172AbcKONJm (ORCPT ); Tue, 15 Nov 2016 08:09:42 -0500 From: Eric Auger To: eric.auger@redhat.com, eric.auger.pro@gmail.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, robin.murphy@arm.com, alex.williamson@redhat.com, will.deacon@arm.com, joro@8bytes.org, tglx@linutronix.de, jason@lakedaemon.net, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, drjones@redhat.com, linux-kernel@vger.kernel.org, pranav.sawargaonkar@gmail.com, iommu@lists.linux-foundation.org, punit.agrawal@arm.com, diana.craciun@nxp.com Subject: [RFC v3 03/10] iommu: Add new reserved IOMMU attributes Date: Tue, 15 Nov 2016 13:09:16 +0000 Message-Id: <1479215363-2898-4-git-send-email-eric.auger@redhat.com> In-Reply-To: <1479215363-2898-1-git-send-email-eric.auger@redhat.com> References: <1479215363-2898-1-git-send-email-eric.auger@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 15 Nov 2016 13:09:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 876 Lines: 28 IOMMU_RESV_NOMAP is used to tag reserved IOVAs that are not supposed to be IOMMU mapped. IOMMU_RESV_MSI tags IOVAs corresponding to MSIs that need to be IOMMU mapped. IOMMU_RESV_MASK allows to check if the IOVA is reserved. Signed-off-by: Eric Auger --- include/linux/iommu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 7f6ebd0..02cf565 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -32,6 +32,10 @@ #define IOMMU_NOEXEC (1 << 3) #define IOMMU_MMIO (1 << 4) /* e.g. things like MSI doorbells */ +#define IOMMU_RESV_MASK 0x300 /* Reserved IOVA mask */ +#define IOMMU_RESV_NOMAP (1 << 8) /* IOVA that cannot be mapped */ +#define IOMMU_RESV_MSI (1 << 9) /* MSI region transparently mapped */ + struct iommu_ops; struct iommu_group; struct bus_type; -- 1.9.1