Re: linux page table
From: Shentino
Date: Sat Sep 01 2012 - 16:02:00 EST
On Sat, Sep 1, 2012 at 12:30 PM, Xin Tong <xerox.time.tech@xxxxxxxxx> wrote:
> When a process is created in Linux, corresponding page table is
> implemented. In the current x86 linux, the page table is a multi-level
> page table and CR3 points to the first level of the page table. I
> have 2 questions.
>
> 1. is the value in CR3 virtual address or physical address ?
It's a physical address. It points the CPU to it in physical memory.
More generally, all addresses in page tables, directories, etc are
physical addresses.
> 2. can the address of the first level of the page table during a
> process's lifetime change ?
This I don't know.
> 3. can two different processes have their CR3 being the same value
> even though they have different first level page tables ?
I'm not sure about this, but I think CR3 is actually bound to the
mm_struct and not the process.
Think about separate processes with the same address space, such as
multithreaded processes.
>
> Thanks
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/