[PATCH v3 05/20] xen/grant: Add helper gnttab_page_grant_foreign_access_ref_one

2015-08-07 Thread Julien Grall
Many PV drivers contain the idiom: pfn = page_to_gfn(...) /* Or similar */ gnttab_grant_foreign_access_ref Replace it by a new helper. Note that when Linux is using a different page granularity than Xen, the helper only gives access to the first 4KB grant. This is useful where drivers are

[PATCH v3 05/20] xen/grant: Add helper gnttab_page_grant_foreign_access_ref_one

2015-08-07 Thread Julien Grall
Many PV drivers contain the idiom: pfn = page_to_gfn(...) /* Or similar */ gnttab_grant_foreign_access_ref Replace it by a new helper. Note that when Linux is using a different page granularity than Xen, the helper only gives access to the first 4KB grant. This is useful where drivers are