This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Cannot get shared page in domU

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Cannot get shared page in domU
From: Xin Jin <jxinpku@xxxxxxxxx>
Date: Wed, 9 Nov 2011 23:15:14 -0500
Delivery-date: Wed, 09 Nov 2011 20:17:32 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=DGvg5JnKxFb5kxSFPe5peZEDq5puyb9Elu+wwPzX4PM=; b=sKgqvSnIKRG40JseJo3GNUe/2HrqYwhQ8okc1fHWOCszJIpi1oYxruaOCbD2B+6LDc S8ScTRhRIuDIn4JMz4IgQTunKr83a2+i0A4pX475jACr9BfhM3FgLTksM1nYmxt0y+cd Hm/Z9Ree+ShfCTBH3KBk+fY06FF8ZWGgXc7dM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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?


-- Xin

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>