Skip to contentSkip to conversation

: __gnttab_map_grant_ref() and iommu

question Mukesh Rathor 2 participants 2 messages Apr 4, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I'm not able to figure why __gnttab_map_grant_ref() does PV iommu mappings for GNTMAP_host_map. Should it not check for GNTMAP_device_map and do for those only?

thanks,
Mukesh

#1 lore raw
Quoted 3 lines · Mukesh Rathor

I'm not able to figure why __gnttab_map_grant_ref() does PV iommu mappings for GNTMAP_host_map. Should it not check for GNTMAP_device_map and do for those only?

I don't know but perhaps it is because when the backend maps a foreign page there is a reasonably high chance that it is eventually going to end up passing that page to a hardware device (e.g. a physical NIC or disk controller) for DMA and therefore the mapping must be reflected in the IOMMU.

Ian.