[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 3/3] xen/arm: introduce XENFEAT_grant_map_identity



On Mon, 28 Jul 2014, Stefano Stabellini wrote:
> On Mon, 28 Jul 2014, Julien Grall wrote:
> > Hi Stefano,
> > 
> > On 07/28/2014 11:16 AM, Stefano Stabellini wrote:
> > > The flag specifies that the hypervisor maps a grant page to guest
> > > physical address == machine address of the page in addition to the
> > > normal grant mapping address.
> > > 
> > > Frontends are allowed to map the same page multiple times using multiple
> > > grant references. On the backend side it can be difficult to find out
> > > the physical address corresponding to a particular machine address,
> > > especially at the completation of a dma operation. To simplify address
> > 
> > completion
> > 
> > [..]
> > 
> > >          if ( err )
> > >          {
> > > @@ -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 )
> > > +        {
> > > +            if ( is_domain_direct_mapped(ld) )
> > > +                err = arch_grant_map_page_identity(ld, op->frame, 0);
> > > +            else
> > > +                err = iommu_map_page(ld, op->frame, op->frame, 
> > > IOMMUF_readable);
> > 
> > With this solution, iommu_map_page will never be called on ARM. It's
> > because gnttab_need_iommu_mapping is checking the domain is using direct
> > mapping.
> > 
> > So, I think you can drop the iommu_map_page callback of the SMMU in
> > patch #2.
> 
> OK. Should I keep your acked-by on that patch?

Actually it has to be done on this patch, otherwise the changes are not
bisectable.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.