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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 CEEA1C433DF for ; Mon, 20 Jul 2020 11:12:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 921282073A for ; Mon, 20 Jul 2020 11:12:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="S2rvxzOt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 921282073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0C67B6B0003; Mon, 20 Jul 2020 07:12:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 077976B0005; Mon, 20 Jul 2020 07:12:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA8196B0006; Mon, 20 Jul 2020 07:12:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id D18D46B0003 for ; Mon, 20 Jul 2020 07:12:04 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8A2DA1CB6A9 for ; Mon, 20 Jul 2020 11:12:04 +0000 (UTC) X-FDA: 77058189768.05.end38_4d0998c26f24 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 26B09184B56AD for ; Mon, 20 Jul 2020 11:11:24 +0000 (UTC) X-HE-Tag: end38_4d0998c26f24 X-Filterd-Recvd-Size: 3273 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Jul 2020 11:11:23 +0000 (UTC) Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1EF952073A; Mon, 20 Jul 2020 11:11:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595243482; bh=oVyIzYwCQBW5SyCkeejp0Vu+XeorkqSTvfQGJPfw4nU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S2rvxzOtDaZhYo7kOCgH4x/FJzQ7OzhcpPNMJ2cUoW4oUTosW/clma/lHEJ3eO95O XcCnldggXNdChmdeCES2GQpBxI5kSPfTxZ9HVS/2r/Yl8uyAWt74MGgOls9wq3ps2D dko+dlPn3RlY+pL0Tf+44tlOReoCVMra4yD4otbc= Date: Mon, 20 Jul 2020 12:11:17 +0100 From: Will Deacon To: Jean-Philippe Brucker Cc: iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, joro@8bytes.org, catalin.marinas@arm.com, robin.murphy@arm.com, baolu.lu@linux.intel.com, Jonathan.Cameron@huawei.com, jacob.jun.pan@linux.intel.com, zhangfei.gao@linaro.org, xuzaibo@huawei.com, zhengxiang9@huawei.com, fenghua.yu@intel.com, hch@infradead.org Subject: Re: [PATCH v8 00/12] iommu: Shared Virtual Addressing for SMMUv3 (PT sharing part) Message-ID: <20200720111116.GE11516@willie-the-truck> References: <20200618155125.1548969-1-jean-philippe@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200618155125.1548969-1-jean-philippe@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 26B09184B56AD X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001135, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jun 18, 2020 at 05:51:13PM +0200, Jean-Philippe Brucker wrote: > Since v7 [1], I split the series into three parts to ease review. This > first one adds page table sharing to the SMMUv3 driver. The second one > adds support for I/O page faults through PRI and Stall, and the last one > adds additional and optional features (DVM, VHE and HTTU). SVA needs the > three parts to work. No significant change apart from that, I just > addressed the previous comments. > > I'd rather everything went through the IOMMU tree but I'm assuming patch > 1 will also go through the x86 tree as part of [2]. It is definitely > required by patch 3 which is required by patch 11. I don't know how this > kind of conflict is usually resolved, but if it's a problem I could > further shrink the series to only patches 4-10 this cycle. Modulo my review comments, I think most of this looks alright from the SMMU side. However, I would really like it if the SVA driver parts could be moved into a separate file (e.g. arm-smmu-v3-sva.c), with a separate config option (dependent on the current one, so you can easily build a driver without SVA support). Does that sound remotely feasible? If so, I think it would really help in terms of maintainability, since the SVA model is really all about the mm, whereas the driver model is all about the device. This makes it really hard to read when you have to keep working out whether the current 'handle' is an mm_struct or an arm_smmu_device. Will