From: Boris Bierbaum <boris@lfbs.RWTH-Aachen.DE>
To: linux-kernel@vger.kernel.org
Subject: How to map physical pages into vma
Date: Wed, 06 Jun 2007 11:39:26 +0200 [thread overview]
Message-ID: <466680CE.6010403@lfbs.rwth-aachen.de> (raw)
Hi,
inside of a kernel module, I need to re-map a part of a processes'
virtual address space (usually from the heap) to a range of physically
contiguous page frames that another kernel module provides me with (I
get a kernel virtual address to the beginning of the first page frame).
I tried remap_pfn_range(), but as Copy-on-Write is used for the heap's
vma, remap_pfn_range() refuses to do the mapping, because I only want to
re-map some part of the vma, not the whole thing.
Then I tried to use vm_insert_page() for each individual physical page,
but as the count is 0 for these pages, this is refused, too.
I can't use split_vma() to split the heap's vma twice and then use
remap_pfn_range() for the vma that represents the part that is to be
re-mapped, because split_vma() isn't supposed to be called from inside a
module, right?
Is there anything I can do about this?
Thanks in advance
Boris
--
| _ RWTH | Boris Bierbaum
|_|_`_ | Lehrstuhl fuer Betriebssysteme
| |_) _ | RWTH Aachen D-52056 Aachen
|_)(_` | Tel: +49-241-80-27805
._) | Fax: +49-241-80-22339
reply other threads:[~2007-06-06 9:55 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=466680CE.6010403@lfbs.rwth-aachen.de \
--to=boris@lfbs.rwth-aachen.de \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox