[Xen-devel] [RFC 12/23] xen: Extend page_to_mfn to take an offset in the page

From
Julien Grall <hidden>
Date
2015-05-19 14:21:30
Also in
lkml, netdev
Reply to
David Vrabel, 2015-05-19
Hi David,

On 19/05/15 14:57, David Vrabel wrote:
On 14/05/15 18:00, Julien Grall wrote:
quoted
With 64KB page granularity support in Linux, a page will be split accross
multiple MFN (Xen is using 4KB page granularity). Thoses MFNs may not be
contiguous.

With the offset in the page, the helper will be able to know which MFN
the driver needs to retrieve.
I think a gnttab_grant_foreign_access_ref()-like helper that takes a
page would be better.

You will probably want this helper able to return/fill a set of refs for
64 KiB pages.
I will see what I can do.

Although, I think this patch is still valid to avoid wrong usage with
64KB page granularity by the caller.

The developer may think that MFN are contiguous which is not always true.

Regards,

-- 
Julien Grall
Thread (66 messages) 66 messages, 7 authors, last reply 2015-06-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help