Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3994260pxb; Mon, 4 Oct 2021 14:43:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaor9KCNJtX2rpKl+d2ok/Io6vCzkvvP9VjbcH0ujoLnmVXa6tMAZ1g8NWg2WnkXwrvc9H X-Received: by 2002:a17:902:7684:b0:13d:e9ec:b467 with SMTP id m4-20020a170902768400b0013de9ecb467mr1719031pll.77.1633383798632; Mon, 04 Oct 2021 14:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633383798; cv=none; d=google.com; s=arc-20160816; b=fCtvQsE0pyabV3GD2F1PIMb5rpxiADEuGSRB5fVt+gmndt5DGZ3Q4z1I6U+ppDqLQt 0wUFVgq1lhSN8myksWC8FZgvwAB3g7VwD8flX3fZmTYuxnhx89CWlSsxlfLNCsuesJQ5 g1qul8Qy6zG77fJtJGqZLM9JOvtk7P2pZ3Jm70GZxPvvm+uYOOActYDDzqbjy9Yx1h32 13F/BzUj1gp5cIMtyZIyPljlZ8qBqJLVPXvc15J6vIlwXw+RZ8Av9akZTsSdBSt18H3U Wt57hxQhfmx52tvuxqH9EzzbS2b62G68hOeRRom+/n6kmBPYRqlfww38qO0OA95f7JFZ WzVg== 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=lLE0C7h/ftXrXOuNRQ+PgY0I4uFMM15bgB/gPbTetOA=; b=LWkro5EaZrgBxk09pEERJy23jw4BKZDqiqUm7ZP/xQ5JtQWWsIno/xzhaYlr8jxk9b ArjeP3N1+Wp0MQ+qxWj3okfbgqCaKcwbeX4Bs3xyGOWxq7lEy+pJI29piPrNpgzOS2ua KL6D0i6mnvzLKGEg/6jJ0JmTGOiYzz8fe4gmWGrErDgn4Yg4YD5SlZRe6EMxy5y/7fkC Du+a9q1JhrK1lfbI3+q4utGiVys2V4ADQ0UFaKfXItgEleuWzxy5m4IWD8DQJ3eOXiNs B9N64+0Wi20Q3in4tpNS5NhIJ2msbM2u9X4gS0pG8vwXYz5EUHLThMpfnMjkKh6T6X7F cAnA== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si20018052pgi.463.2021.10.04.14.43.06; Mon, 04 Oct 2021 14:43:18 -0700 (PDT) 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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235554AbhJDN4W (ORCPT + 99 others); Mon, 4 Oct 2021 09:56:22 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3912 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235345AbhJDNz7 (ORCPT ); Mon, 4 Oct 2021 09:55:59 -0400 Received: from fraeml711-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HNMZ019Tfz67lgF; Mon, 4 Oct 2021 21:51:04 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml711-chm.china.huawei.com (10.206.15.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 4 Oct 2021 15:54:09 +0200 Received: from [10.47.27.199] (10.47.27.199) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 4 Oct 2021 14:54:07 +0100 Subject: Re: [PATCH 0/5] iommu: Some IOVA code reorganisation To: Will Deacon CC: , , , , , , , , , , References: <1632477717-5254-1-git-send-email-john.garry@huawei.com> <20211004114418.GC27373@willie-the-truck> From: John Garry Message-ID: <1ff2aeb0-a5d0-f2a4-bd5d-d8f9669a54ed@huawei.com> Date: Mon, 4 Oct 2021 14:56:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20211004114418.GC27373@willie-the-truck> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.27.199] X-ClientProxiedBy: lhreml710-chm.china.huawei.com (10.201.108.61) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/10/2021 12:44, Will Deacon wrote: > On Fri, Sep 24, 2021 at 06:01:52PM +0800, John Garry wrote: >> The IOVA domain structure is a bit overloaded, holding: >> - IOVA tree management >> - FQ control >> - IOVA rcache memories >> >> Indeed only a couple of IOVA users use the rcache, and only dma-iommu.c >> uses the FQ feature. >> >> This series separates out that structure. In addition, it moves the FQ >> code into dma-iommu.c . This is not strictly necessary, but it does make >> it easier for the FQ domain lookup the rcache domain. >> >> The rcache code stays where it is, as it may be reworked in future, so >> there is not much point in relocating and then discarding. >> >> This topic was initially discussed and suggested (I think) by Robin here: >> https://lore.kernel.org/linux-iommu/1d06eda1-9961-d023-f5e7-fe87e768f067@arm.com/ > Hi Will, > It would be useful to have Robin's Ack on patches 2-4. The implementation > looks straightforward to me, but the thread above isn't very clear about > what is being suggested. Sure, I intentionally didn't add names to patches so avoid possible incorrect attribution. > > To play devil's advocate: there aren't many direct users of the iovad code: > either they'll die out entirely (and everybody will use the dma-iommu code) > and it's fine having the flush queue code where it is, or we'll get more > users and the likelihood of somebody else wanting flush queues increases. > I make it 5x direct users (including vdpa). Anyway, as I mentioned, I'm not totally determined to relocate the FQ code. It's just that dma-iommu is the only user today and co-locating makes the iova rcache domain info lookup easier from the FQ code. Thanks, John