All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lamia Youseff <lyouseff@cs.ucsb.edu>
To: Xen-devel@lists.xensource.com
Subject: Problem using alloc_vm_area()
Date: Wed, 22 Oct 2008 19:28:35 -0700	[thread overview]
Message-ID: <48FFE153.4020706@cs.ucsb.edu> (raw)

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

                 reply	other threads:[~2008-10-23  2:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48FFE153.4020706@cs.ucsb.edu \
    --to=lyouseff@cs.ucsb.edu \
    --cc=Xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.