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

[Xen-devel] Re: [PATCH 01/11] xen: define gnttab_set_map_op/unmap_op



On Wed, 2011-01-05 at 20:25 +0000, Konrad Rzeszutek Wilk wrote:
> On Wed, Dec 15, 2010 at 01:40:36PM +0000, stefano.stabellini@xxxxxxxxxxxxx 
> wrote:

> > +static inline void
> > +gnttab_set_map_op(struct gnttab_map_grant_ref *map, phys_addr_t addr,
> > +             uint32_t flags, grant_ref_t ref, domid_t domid)
> > +{
> > +   if (flags & GNTMAP_contains_pte)
> > +           map->host_addr = addr;
> > +   else if (xen_feature(XENFEAT_auto_translated_physmap))
> > +           map->host_addr = __pa(addr);
> > +   else
> > +           map->host_addr = addr;
> 
> Why not just get rid of the "flags & GNTMAP_contains_pte"? If
> that returns false you still end up setting map->host_addr to addr.

That would behave differently if
xen_feature(XENFEAT_auto_translated_physmap) were true.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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