All of lore.kernel.org
 help / color / mirror / Atom feed
* Cannot get shared page in domU
@ 2011-11-10  4:15 Xin Jin
  2011-11-10  5:09 ` Daniel Castro
  0 siblings, 1 reply; 5+ messages in thread
From: Xin Jin @ 2011-11-10  4:15 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 755 bytes --]

Hi, I cannot get a shared page in domU.

In a domU, I used the folloing code to grant a page to another domU.
share_mem = (share_mem_desp *) __get_free_page(GFP_KERNEL);
share_mem->gref = gnttab_grant_foreign_access(domid_remote,
virt_to_mfn(share_mem), 0);

In another domU, I used the folloing code to get the shared page.
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 );

While using the exactly same code to get the shared page in dom0, it woks
all well. But it cannot work in domU.

I use Xen 4.1.1 and fedora 14 ( linux 3.1.0 both for dom0 and domU ).

Can anyone help me?

Thanks!

-- Xin

[-- Attachment #1.2: Type: text/html, Size: 1015 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-11  1:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10  4:15 Cannot get shared page in domU Xin Jin
2011-11-10  5:09 ` Daniel Castro
2011-11-10 15:54   ` Xin Jin
2011-11-10 22:21     ` Konrad Rzeszutek Wilk
2011-11-11  1:02       ` Xin Jin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.