From: "Jan Beulich" Subject: Re: [PATCH v4 3/3] xen/arm: introduce XENFEAT_grant_map_identity Date: Mon, 28 Jul 2014 11:55:00 +0100 Message-ID: <53D6482402000078000268BD@mail.emea.novell.com> References: <1406542610-18724-3-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XBia8-0003d5-Ao for xen-devel@lists.xenproject.org; Mon, 28 Jul 2014 10:55:04 +0000 In-Reply-To: <1406542610-18724-3-git-send-email-stefano.stabellini@eu.citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel , Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 28.07.14 at 12:16, wrote: > @@ -941,9 +951,18 @@ __gnttab_unmap_common( > int err = 0; > mapcount(lgt, rd, op->frame, &wrc, &rdc); > if ( (wrc + rdc) == 0 ) > - err = iommu_unmap_page(ld, op->frame); > - else if ( wrc == 0 ) > - err = iommu_map_page(ld, op->frame, op->frame, IOMMUF_readable); > + { > + if ( is_domain_direct_mapped(ld) ) > + err = arch_grant_unmap_page_identity(ld, op->frame); > + else > + err = iommu_unmap_page(ld, op->frame); > + } else if ( wrc == 0 ) Coding style. With that taken care of: Acked-by: Jan Beulich