diff options
author | Julien Grall <julien.grall@citrix.com> | 2015-06-19 19:05:06 +0200 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-10-23 15:20:34 +0200 |
commit | 3922f32c1e6db2e096ff095a5b8af0b940b97508 (patch) | |
tree | 5170cad0c1b2e55c7332aeed768423e145a31952 /drivers/block/xen-blkfront.c | |
parent | xen/grant: Introduce helpers to split a page into grant (diff) | |
download | linux-3922f32c1e6db2e096ff095a5b8af0b940b97508.tar.xz linux-3922f32c1e6db2e096ff095a5b8af0b940b97508.zip |
xen/grant: Add helper gnttab_page_grant_foreign_access_ref_one
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@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions