[PATCH v5 05/22] xen/grant: Add helper gnttab_page_grant_foreign_access_ref_one

Julien Grall julien.grall at citrix.com
Wed Sep 30 03:50:27 PDT 2015


On 30/09/15 11:45, Julien Grall wrote:
> 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 allocating a full Linux page for each
> grant.
> 
> Also include xen/interface/grant_table.h rather than xen/grant_table.h in
> asm/page.h for x86 to fix a compilation issue [1]. Only the former is
> useful in order to get the structure definition.
> 
> [1] Interdependency between asm/page.h and xen/grant_table.h which result
> to page_mfn not being defined when necessary.
> 
> Signed-off-by: Julien Grall <julien.grall at linaro.org>

Hmmm... this should be julien.grall at citrix.com. Still mixing up with my
old address.

I've fixed it in the branch associated to this series.

Regards,

-- 
Julien Grall



More information about the linux-arm-kernel mailing list