]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/grant: Introduce helpers to split a page into grant
authorJulien Grall <julien.grall@citrix.com>
Fri, 19 Jun 2015 16:49:03 +0000 (17:49 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Sun, 27 Mar 2016 01:01:05 +0000 (02:01 +0100)
commita2c94220e118502c315c5600715f1043d56187a0
treec0e94d9af8dc431e8ef0ad81490b55d82e63666d
parent289becdd70a6d856b1062725e6c6e00da7eb0e24
xen/grant: Introduce helpers to split a page into grant

Currently, a grant is always based on the Xen page granularity (i.e
4KB). When Linux is using a different page granularity, a single page
will be split between multiple grants.

The new helpers will be in charge of splitting the Linux page into grants
and call a function given by the caller on each grant.

Also provide an helper to count the number of grants within a given
contiguous region.

Note that the x86/include/asm/xen/page.h is now including
xen/interface/grant_table.h rather than xen/grant_table.h. It's
necessary because xen/grant_table.h depends on asm/xen/page.h and will
break the compilation. Furthermore, only definition in
interface/grant_table.h is required.

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>
(cherry picked from commit 008c320a96d218712043f8db0111d5472697785c)
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
arch/x86/include/asm/xen/page.h
drivers/xen/grant-table.c
include/xen/grant_table.h