: __gnttab_map_grant_ref() and iommu
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
Quoted 3 lines · Mukesh Rathor
I'm not able to figure why
__gnttab_map_grant_ref()does PV iommu mappings forGNTMAP_host_map. Should it not check forGNTMAP_device_mapand 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.