Skip to contentSkip to conversation

Question on xc_gnttab_map_grant_ref()

DISCUSSION NAHieu 1 participant 1 message Nov 3, 2005

lore
Share & tools
lore

NAHieu

author
#0 lore raw

Hi,

I am writing a kermel module in DomU, and this module grants a page of memory to Dom0. Then in Dom0 I try to grant_map it with xc_gnttab_map_grant_ref()

But this function requires a flag, and I don't know which option to give it. I tried with either GNTMAP_application_map or GTF_reading|GTF_writing, but I always got this error:

ERROR: do_gnttab_op: HYPERVISOR_grant_table_op failed: -1

Anybody please tell me how to use xc_gnttab_map_grant_ref() properly in Dom0's userspace?

Many thanks.
Hieu