Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp629281pxb; Tue, 2 Feb 2021 13:42:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcXushAaba2FJ+HCCUFVM+IacGDOLNBjZx+BzseySx8Bq4uvHhyPs0fCFxRB+Zl+E+Gymc X-Received: by 2002:aa7:cc98:: with SMTP id p24mr131158edt.126.1612302177445; Tue, 02 Feb 2021 13:42:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612302177; cv=none; d=google.com; s=arc-20160816; b=THcTFNy8kQzyeN7DPJNFtTZr8hxqO0r6VE0smDVRySrroQP5gcw4L50F78nc+7vgGz Zu8E1hnbKWY06hIDO2CD9trAPY+0pFMXP/nXXTzMwtZhpK5WofcZMUaZ8D6e1DO8eryb 35j7dkgQmnM3BiX6XZBlUlAsmt+1H3/fPvZw40MzO+SohNDkP1GHtjwuP3AHIHo6uYG1 cpC1tXtV8UZSeVKWg7iq3+2nW82nblLR60p8n94/yJwF9uPinBw4ePpzZurrkmPcdNf2 rchzbF8bRI2kB7lWM8KtITuBF5C60/Fw9HtkUicsrnlbskrjXKDTIyRl2AKINTYPQCmt 1b1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=3xvGx6eR8P1Tv/InkAACkcASEvnSRSqy4JJt8fSKlMU=; b=Oalja3owQOi/cZ9TzoYdgmYmr1in8NnopZ0OP7S41S3qLxHUFv1QeiSKMWml3x3rrP QUTdRHqfFyOYJ9TUSEqOXO4SjlUjSo2vFM0+gPXyCHkkHQ3CyqzF6VKWB+tMLWvXiYOn PFn5COUKyq60GgyC3oVdomWSP79PWfkhp6lF51e0Lcs5McIQhhX1hIhP0nBrQlwulQ9u B4XIs5A5ewOvp0ejYgMAm3f1thlLYT+ygCUpuVHIex44pa9rmHH4tzMkE0w4z7dxEGz0 FNz5AimDsFCk3zIVbBCLFUMFbWDek8n5QPefZIErt1EZe/NXWsfvghYp0+Wv5DLcd6JL NZKg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs15si46413ejb.717.2021.02.02.13.42.22; Tue, 02 Feb 2021 13:42:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232667AbhBBNl0 (ORCPT + 99 others); Tue, 2 Feb 2021 08:41:26 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12067 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232690AbhBBNiE (ORCPT ); Tue, 2 Feb 2021 08:38:04 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DVQGh3THKzMSx2; Tue, 2 Feb 2021 21:13:00 +0800 (CST) Received: from [10.174.184.42] (10.174.184.42) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Tue, 2 Feb 2021 21:14:30 +0800 Subject: Re: [PATCH] iommu: Update the document of IOMMU_DOMAIN_UNMANAGED To: Robin Murphy , , , References: <20210202085330.31716-1-zhukeqian1@huawei.com> <8eac9259-66e5-9b83-39a9-46a86097d450@arm.com> CC: Marc Zyngier , Alex Williamson , , Will Deacon , From: Keqian Zhu Message-ID: Date: Tue, 2 Feb 2021 21:14:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <8eac9259-66e5-9b83-39a9-46a86097d450@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.184.42] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/2 20:58, Robin Murphy wrote: > 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... Yep, a more generalised description is better. After I have a look at all the use cases... Thanks, Keqian > > Robin. > >> * IOMMU_DOMAIN_DMA - Internally used for DMA-API implementations. >> * This flag allows IOMMU drivers to implement >> * certain optimizations for these domains >> > . >