[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Question about Xen grant table

  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Haifeng He" <hehaifeng2nd@xxxxxxxxx>
  • Date: Sun, 18 Nov 2007 16:39:09 -0700
  • Delivery-date: Sun, 18 Nov 2007 15:39:50 -0800
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>


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));

    BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, ops, npage));

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?



Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.