From: Ian Campbell Subject: Re: [PATCH v8 4/4] xen/arm: grant: Add another entry to map MFN 1:1 in dom0 p2m Date: Tue, 20 May 2014 10:21:35 +0100 Message-ID: <1400577695.25175.22.camel@kazak.uk.xensource.com> References: <1400516640-7175-1-git-send-email-julien.grall@linaro.org> <1400516640-7175-5-git-send-email-julien.grall@linaro.org> <537B24690200007800013EF0@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WmgEw-0006Ov-DN for xen-devel@lists.xenproject.org; Tue, 20 May 2014 09:21:42 +0000 In-Reply-To: <537B24690200007800013EF0@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xenproject.org, Julien Grall , stefano.stabellini@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-05-20 at 08:46 +0100, Jan Beulich wrote: > >>> On 19.05.14 at 18:24, wrote: > > Grant mapping can be used for DMA request. The dev_bus_addr returned by the > > hypercall is the MFN (not the IPA). Currently Linux is using this address (via > > swiotlb) to program the DMA. > > When the device is protected by IOMMU the request will fail. We have to > > add 1:1 mapping in the domain p2m to allow DMA request working. > > > > This is valid because DOM0 has its memory mapped 1:1 and therefore we know > > that RAM and devices cannot clash. > > Wasn't this 1:1 mapping meant as a temporary workaround? If so, > does it really make sense to base further code on it? IOMMU on ARM has not become so prevalent (yet?) that we can get rid of it. I think we are mostly resigned to keeping it around for the time being. (sadly) Ian.