Skip to contentSkip to conversation

can I do mfn to page?

DISCUSSION Eli Cohen 1 participant 1 message Jul 6, 2011

lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

Hi,
I am trying to use the grant tables mechanism to do allocate memory in domU and obtain a struct page * for that memory in dom0.

I do the following in domU:
1. __get_free_pages
2. virt_to_mfn
3. gnttab_grant_foreign_access

Now I have a reference which I pass to dom0.

In dom0 I would like but don't know how to do:
1. Get the refrence to the page without mapping it to dom0 address space (all I want is make sure the page is still owned by domU so I want to use the passed reference).
2. Use a "mfn to struct page *" call.

Is that possible?

Thanks.