Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753495AbdGSK6J (ORCPT ); Wed, 19 Jul 2017 06:58:09 -0400 Received: from foss.arm.com ([217.140.101.70]:37852 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754AbdGSK6H (ORCPT ); Wed, 19 Jul 2017 06:58:07 -0400 Subject: Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS To: Anup Patel , Will Deacon , Joerg Roedel , Baptiste Reynal , Alex Williamson Cc: Scott Branden , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com References: <1500456838-18405-1-git-send-email-anup.patel@broadcom.com> <1500456838-18405-2-git-send-email-anup.patel@broadcom.com> From: Robin Murphy Message-ID: <675744d3-b070-1245-6ebc-579c4b5f4a75@arm.com> Date: Wed, 19 Jul 2017 11:58:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1500456838-18405-2-git-send-email-anup.patel@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1183 Lines: 35 On 19/07/17 10:33, Anup Patel wrote: > Some of the IOMMUs (such as ARM SMMU) are capable of bypassing > transactions for which no IOMMU domain is configured. > > This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU > drivers to advertise transation bypass capability of an IOMMU. Whatever the intended semantics of this are, I can't help thinking it would be better served by allowing callers to explicitly allocate their own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the problem we have with legacy virtio devices behind real IOMMUs. Robin. > Signed-off-by: Anup Patel > --- > include/linux/iommu.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 2cb54ad..6bbb4cc 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -101,6 +101,10 @@ enum iommu_cap { > transactions */ > IOMMU_CAP_INTR_REMAP, /* IOMMU supports interrupt isolation */ > IOMMU_CAP_NOEXEC, /* IOMMU_NOEXEC flag */ > + IOMMU_CAP_BYPASS, /* > + * IOMMU can bypass transactions for > + * which domain is not configured > + */ > }; > > /* >