[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Cannot get shared page in domU
On Thu, Nov 10, 2011 at 5:21 PM, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
The function I use is int gnttab_grant_foreign_access(domid_t domid, unsigned long frame, int readonly); It only has 3 parameters.
The function void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid, unsigned long frame, int readonly); has 4 papameters.
I use GNTMAP_host_map to get the grant page as following.
share_vmarea = alloc_vm_area(PAGE_SIZE); gnttab_set_map_op( &map_op, (unsigned long)share_vmarea->addr, GNTMAP_host_map, gref, domid_remote );
HYPERVISOR_grant_table_op( GNTTABOP_map_grant_ref, &map_op, 1 ); Did you look in the 3.1 linux kerne in the gntdev.c driver? Or the other drivers? I'm writing a kernel driver module, which tries to communicate between domUs through shared memory. I only want to use grant table, and do not want to involve Xen event channel.
When I did as the code above, the code works well in dom0. It means dom0 can use the following hypercall "share_vmarea = alloc_vm_area(PAGE_SIZE);
gnttab_set_map_op( &map_op, (unsigned long)share_vmarea->addr, GNTMAP_host_map, gref, domid_remote );
HYPERVISOR_grant_table_op( GNTTABOP_map_grant_ref, &map_op, 1 );" to get the grant page successfully. But when I use the same code in domU, it cause errors in kernel "unable to request kernel paging request at ffffc900000da00c". (I used the right remote_domid to specify which domain to grant the page to.) Do you know what's wrong? How can I get it right?
Xin JIN PhD student Department of Computer Science Princeton University _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |