Messages in this thread |  | | | Subject | Re: [PATCH 01/11] xen: define gnttab_set_map_op/unmap_op | | From | Ian Campbell <> | | Date | Thu, 6 Jan 2011 09:16:30 +0000 |
| |
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@eu.citrix.com 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.
|  |