From: "Benjamin C.R. LaHaise" <blah@kvack.org>
To: Timur Tabi <ttabi@interactivesi.com>
Cc: Linux MM mailing list <linux-mm@kvack.org>
Subject: Re: pgd/pmd/pte and x86 kernel virtual addresses
Date: Thu, 24 Aug 2000 19:43:41 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.3.96.1000824193751.16795A-100000@kanga.kvack.org> (raw)
In-Reply-To: <20000824233129Z131177-247+8@kanga.kvack.org>
On Thu, 24 Aug 2000, Timur Tabi wrote:
> On x86, when running the kernel, all memory is mapped with a simple offset.
> The virtual address is merely an offset from the physical address.
> Does that mean that the pgd/pmd/pte tables are still used?
x86 only uses two level page tables, so effectively only the pgd and pte
are used. Unlike some CPUs like sparc, all virtual mappings do indeed
have entries in the pgd (but not always in the ptes).
> Basically, what I'm
> trying to do is find the pte for a given physical page. That is, I'm looking
> for a function that looks like this:
>
> pte_t *find_pte(mem_map_t *mm);
>
> Given a pointer to a mem_map_t, it returns the pointer to the pte_t for that
> physical page. Is there such a function? I've found things like this:
There is no such function, and there cannot be for kernel addresses
since on most x86s, the kernel makes use of 4MB pages to map chunks of
memory. If you're looking for the user addresses associated with a
physical page, there are several ways of doing so, but none of them are
implemented in the current kernel.
Why do you need this/what are you trying to do?
-ben
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-08-24 23:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-24 23:21 Timur Tabi
2000-08-24 23:43 ` Benjamin C.R. LaHaise [this message]
2000-08-25 15:25 ` Timur Tabi
2000-08-25 16:45 ` Benjamin C.R. LaHaise
2000-08-25 16:40 ` Timur Tabi
2000-08-25 16:59 ` Benjamin C.R. LaHaise
2000-08-25 18:46 ` Timur Tabi
2000-08-26 3:59 ` Benjamin C.R. LaHaise
2000-08-28 23:09 ` Stephen C. Tweedie
2000-08-29 15:31 ` Timur Tabi
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=Pine.LNX.3.96.1000824193751.16795A-100000@kanga.kvack.org \
--to=blah@kvack.org \
--cc=linux-mm@kvack.org \
--cc=ttabi@interactivesi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox