From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FDF2C433E0 for ; Tue, 2 Feb 2021 13:00:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0BBA64F45 for ; Tue, 2 Feb 2021 13:00:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229926AbhBBM7t (ORCPT ); Tue, 2 Feb 2021 07:59:49 -0500 Received: from foss.arm.com ([217.140.110.172]:49364 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbhBBM7p (ORCPT ); Tue, 2 Feb 2021 07:59:45 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 442C81FB; Tue, 2 Feb 2021 04:58:59 -0800 (PST) Received: from [10.57.35.163] (unknown [10.57.35.163]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CC6083F718; Tue, 2 Feb 2021 04:58:57 -0800 (PST) Subject: Re: [PATCH] iommu: Update the document of IOMMU_DOMAIN_UNMANAGED To: Keqian Zhu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org Cc: Marc Zyngier , Alex Williamson , jiangkunkun@huawei.com, Will Deacon , wanghaibin.wang@huawei.com References: <20210202085330.31716-1-zhukeqian1@huawei.com> From: Robin Murphy Message-ID: <8eac9259-66e5-9b83-39a9-46a86097d450@arm.com> Date: Tue, 2 Feb 2021 12:58:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210202085330.31716-1-zhukeqian1@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-02 08:53, Keqian Zhu wrote: > Signed-off-by: Keqian Zhu > --- > include/linux/iommu.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 77e561ed57fd..e8f2efae212b 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -68,7 +68,7 @@ struct iommu_domain_geometry { > * devices > * IOMMU_DOMAIN_IDENTITY - DMA addresses are system physical addresses > * IOMMU_DOMAIN_UNMANAGED - DMA mappings managed by IOMMU-API user, used > - * for VMs > + * for VMs or userspace driver frameworks Given that "VMs" effectively has to mean VFIO, doesn't it effectively already imply other uses of VFIO anyway? Unmanaged domains are also used in other subsystems/drivers inside the kernel and we're not naming those, so I don't see that it's particularly helpful to specifically call out one more VFIO use-case. Perhaps the current wording could be generalised a little more, but we certainly don't want to start trying to maintain an exhaustive list of users here... Robin. > * IOMMU_DOMAIN_DMA - Internally used for DMA-API implementations. > * This flag allows IOMMU drivers to implement > * certain optimizations for these domains >