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] Problem using alloc_vm_area()

To: Xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Problem using alloc_vm_area()
From: Lamia Youseff <lyouseff@xxxxxxxxxxx>
Date: Wed, 22 Oct 2008 19:28:35 -0700
Cc:
Delivery-date: Wed, 22 Oct 2008 19:29:01 -0700
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
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)
Hi all,

I am having trouble mapping an area allocated by vmalloc_alloc_area to
user space. I would appreciate any help or hint on what i might be
missing in my implementation.

Inside my device_mmap, this is what i do.
I first allocate memory using
1. mem = alloc_vm_area( 1 * PAGE_SIZE );


then i get pfn using vmalloc_to_pfn,
2. pfn = vmalloc_to_pfn((struct vm_struct*)mem)->addr);

then, i try to map it using
3. ret = remap_pfn_range(vma, vma->start, pfn, PAGE_SIZE,
                                 PAGE_SHARED);

Although remap_pfn_range does not return an error, the DomU kernel
randomly crashes, or if it worked, it is not mapped to user-space
correctly. I need your advise on line 2 & 3, if possible. Please, let me
know if i can provide more information,

Thank you,
-- Lamia


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Problem using alloc_vm_area(), Lamia Youseff <=