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] How to map multiple pages from a DomU to Dom0?

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] How to map multiple pages from a DomU to Dom0?
From: Xin Zhao <zhaoxin@xxxxxxxxxxxxxx>
Date: Tue, 25 Jan 2005 14:53:13 -0500 (EST)
Delivery-date: Tue, 25 Jan 2005 19:55:14 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
I tried to use alloc_pages() in DomU to allocate 16 pages and use
direct_remap_area_pages() in Dom0 to map that memory region into Dom0, the code 
is as following:

DomU:
svd_ring = (svdif_ring_t *) alloc_pages(GFP_KERNEL, 4);
then send (virt_to_machine(svd_ring) >> PAGE_SHIFT) to Dom0

Dom0:
error = direct_remap_area_pages(&init_mm, VMALLOC_VMADDR(vma->addr),
                                    mapcmd.shmem_addr<<PAGE_SHIFT,
                                    PAGE_SIZE*16,
                                    prot, 1);
Here, mapcmd.shmem_addr=(virt_to_machine(svd_ring) >> PAGE_SHIFT);

it seems to remap successfully, but when I tried to access vma->addr in
Dom0, DomU crashed. I don't know why. :(

Can someone give me some advice?

I also noticed that
HYPERVISOR_multicall(__HYPERVISOR_update_va_mapping_otherdomain) seems to
be able to remap memory. But I haven't figure out how to use that
hypervisor call.

So what is the right way to map memory pages from DomU to Dom0?

Thanks in advance!

-x


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] How to map multiple pages from a DomU to Dom0?, Xin Zhao <=