Thread (63 messages) 63 messages, 5 authors, 2015-09-01

[Xen-devel] [PATCH v3 04/20] xen/grant: Introduce helpers to split a page into grant

From: Julien Grall <hidden>
Date: 2015-08-28 14:30:57
Also in: lkml

Hi David,

On 20/08/15 10:51, David Vrabel wrote:
On 07/08/15 17:46, Julien Grall wrote:
quoted
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 to split 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 was required.
Reviewed-by: David Vrabel <redacted>
But...
quoted
+/* Helper to get to call fn only on the first "grant chunk" */
+static inline void gnttab_one_grant(struct page *page, unsigned int offset,
+				    unsigned len, xen_grant_fn_t fn,
+				    void *data)
...call this gnttab_for_one_grant().
Will rename it on the next version.

Regards,

-- 
Julien Grall
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help