WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Question about Xen grant table

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Question about Xen grant table
From: "Haifeng He" <hehaifeng2nd@xxxxxxxxx>
Date: Sun, 18 Nov 2007 16:39:09 -0700
Delivery-date: Sun, 18 Nov 2007 15:39:50 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=Pqs43DYa1UcPsJwAOlo2ZDNPQSZOyclXIwUSLufgkdc=; b=TheO0c0WojVVN3tjmyC8gqY0zqQzIOAo6s/VWuw9z1imaFibZD3HN4NalgM3/WLPXcUmNnG0fddAv8qsZtM0235OMjck5FuRAf3AQEJmAW22hmEL11V+z19iuSdmClO9yN5/JqjBJpePz5m59ENg6oLgT8pTHX4v07b23u3GPRE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Opg0WFcjIPxvMij29nExFjvSGtuhIzAQ93w4U/Mn/kO7lS+BJSRTajM+lN0vnjTmxHS2Z3h5GD/55djS+waOJjsjokH+Xycep876bcplV/FPz3XNoyUi1u/B+0oBbXtIcRbRLR+/8QvgH1TZNxVQ5U3GThr1gVoXPIx5pUxin7g=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I have been able to setup share memory between domains using grant
table but I still have a question about
getting grant reference mapping. My current code to map grant
reference looks like the following:

    vm_area = alloc_vm_area(PAGE_SIZE*npage);

    for(i=0; i<npage; i++) {
        ops[i].flags = GNTMAP_host_map;
        ops[i].ref = ref[i];
        ops[i].dom = rid;
        ops[i].host_addr = (unsigned long)(vm_area->addr+(i*PAGE_SIZE));
    }

    lock_vm_area(vm_area);
    BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, ops, npage));
    unlock_vm_area(vm_area);

For my understanding, it will first allocate new vm nodes and use the
given vm address as host address to get reference.
The problem here is, the address of vm_area can be arbitrary. Is it
possible that, I can specify the host address
to be some pre-determined address? For example, suppose I would like
to map the grant reference to a virtual address starting from, say
0xc2000000? Any suggestion?

Thanks

Haifeng

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Question about Xen grant table, Haifeng He <=