From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQBxh-0004Nb-K7 for qemu-devel@nongnu.org; Tue, 05 Jun 2018 09:25:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQBxc-0000tL-6j for qemu-devel@nongnu.org; Tue, 05 Jun 2018 09:25:21 -0400 Date: Tue, 5 Jun 2018 21:25:01 +0800 From: Peter Xu Message-ID: <20180605132501.GH9216@xz-mi> References: <20180604152941.20374-1-peter.maydell@linaro.org> <20180605073937.GD9216@xz-mi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2 00/13] iommu: support txattrs, support TCG execution, implement TZ MPC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-arm , QEMU Developers , "patches@linaro.org" , Alex =?utf-8?Q?Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini , Eric Auger On Tue, Jun 05, 2018 at 10:13:12AM +0100, Peter Maydell wrote: > On 5 June 2018 at 08:39, Peter Xu wrote: > > On Mon, Jun 04, 2018 at 04:29:28PM +0100, Peter Maydell wrote: > >> Hi; this is v2 of my iommu patchset, which does: > >> * support IOMMUs that are aware of memory transaction attributes and > >> may generate different translations for different attributes > >> * support TCG execution out of memory which is behind an IOMMU > >> * implement the Arm TrustZone Memory Protection Controller > >> (which needs both the above features in the IOMMU core code) > >> * use the MPC in the mps2-an505 board > > > It seems that this series is still using the IOMMU index way. In case > > I missed anything... Could you elaborate a bit on why this IOMMU index > > solution is preferred comparing to the way to pass in MemTxAttrs? Or > > was there any further discussion I missed on the topic? > > > > My last post to previous series is here: > > > > https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg05702.html > > > > In that, I was still confused on why we couldn't use the existing > > MemTxAttrs directly instead of the new IOMMU index (and I explained on > > why that was prefered at least to me). I didn't see replies > > afterwards. > > Broadly speaking I didn't think I had any further better > explanation than I'd already given in that thread, eg here: > https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg05250.html > and here: > https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg05513.html > > If you want to make a specific (detailed) counterproposal of a > different API, I'm happy to look at whether that works for > the use cases I care about and whether it's a nicer way to do it. I posted a few pesudo code (ok, it can actually compile...) to show what I meant. Please have a look there: [RFC 0/3] memory: enhance IOMMU notifier to support USER bit I very suspect I missed some important requirement there but I cannot really figure it out myself. Hope these patches can either provide an alternative solution on the problem, or help me to figure out what I missed. Thanks, -- Peter Xu