From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsSy7-0004WG-Ve for qemu-devel@nongnu.org; Wed, 13 May 2015 05:28:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsSy7-0001mH-0d for qemu-devel@nongnu.org; Wed, 13 May 2015 05:28:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsSy6-0001m1-SZ for qemu-devel@nongnu.org; Wed, 13 May 2015 05:28:46 -0400 Message-ID: <55531946.9080501@redhat.com> Date: Wed, 13 May 2015 11:28:38 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20140907014747.GA12586@zapo.iiNet> <20150513064105.GZ10142@toto> In-Reply-To: <20150513064105.GZ10142@toto> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Supporting multiple CPU AddressSpaces and memory transaction attributes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" , Peter Maydell Cc: Peter Crosthwaite , Richard Henderson , QEMU Developers , Greg Bellows On 13/05/2015 08:41, Edgar E. Iglesias wrote: > I think it would be nice if address_space_translate_for_iotlb > was allowed to modify the attributes so that an IOMMU in front > of a CPU could for example down-grade a secure to a non-secure accesse > (once we add IOMMU support in front of CPUs). If I understood correctly > the memattrs would stay as a separate field in the iotlb, so this > would be easy to implement? Yes, it should. > The naive implementation I have keeps pointers to AS and the memattrs > in the iotlb. address_space_translate_for_iotlb walks any IOMMU > translate() fns, if it hits a RAM it returns the host addr as usual. How is the TLB invalidated on IOMMU changes? Paolo > If it hits MMIO behind IOMMUs it returns the first memsection, i.e > the one pointing to the iommu-ops and lets the IO access helpers > deal with the access via address_space_rw (for every IO access, slow).