Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp624495pxb; Tue, 2 Feb 2021 13:33:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJygdnqCsP355wi8HnHS2m208FnkwPRUOIQTqueEQBKMBTzEN5E+Xr40qvwjyBJ+qHJjKzCA X-Received: by 2002:a17:906:4159:: with SMTP id l25mr23384019ejk.311.1612301617544; Tue, 02 Feb 2021 13:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612301617; cv=none; d=google.com; s=arc-20160816; b=xXge43CmelHz+K1UFeQ6foAAnd01FEf+qZAEQvNbOz+rCubX96p5/6FLqYj0iWvXyR X22viNI0t9JZpIWkmQp47Jj2Y3ElQHXOpxH6hCfaCCSF/11X3WilXn6iX1OyLXlxL6ca U5p4SgwLvdtz/m+uNIxmpuCYDGMnj2Zil5u1DuktmO+p4gHTU4h//dHmZurQ8dVlnKh5 nXjwelOpt6uI1i4O/UqpFcq1HbEBTWjb1kOjeQm+AKlR7mtPaZLvvPwokvfcAin+8ttq 7fYyenU7MuHsa1hFxosgw4CaZ3VfNh2E9XGQn92Ar3vr+Y/0W9d/ZYhNLfAgyGSZ36Jl lwKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=HiAiV7E1nPJXXVJGMBuGBCraC9kWR2GwjtWuviM5fPI=; b=XgZSMLsyLGwqDgDIszAvWF5sYjtRIcRYcKW8d/+LKkeIuHZWYRBKgtdd86kgU7HSoR xgeo8MvnJjr1Bdh7rOt5biFT2wLhqAw18zsV7/iSmzg01rJhDdz3KLPsCtHw/39waZfe VlWLjEh0aHSyuv2hpe8ZacOMMXF/pYXS9ImGOeUkHhG7SkpgPuVlQLGhiQv296ihLQDp iyJnjNJ+bNLvf8KbxS9a8YKu6iVfwry45aPNeec9mNYQV2Ndy75y7rqFVtRKA+To39od DvizqnMrFnrMpvoqZVBc5Rv9I65JmJBue8mHFitlWVwc6NBC3IkJMrXGetaGCM4hpzVG BVdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si48165ejj.455.2021.02.02.13.33.12; Tue, 02 Feb 2021 13:33:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbhBBM7t (ORCPT + 99 others); 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 >