|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [RESEND] Question about recursive mappings
Keir Fraser wrote:
On 23 May 2006, at 10:41, Ian Pratt wrote:
Can you explain the pagtable structure a little better please. Does the
L3 contain an entry point at itself (recursive), or at another L3
(foreign)?
I've never come across non-root pagetable linear mappings other than in
the crock that is PAE (3 level) where you have to use 4 entries in an L2
to point to all the L2s due to the limited address space.
And that's something we don't currently support. A slightly more
generic linear pagetable logic that would permit us to support linear
pagetables on PAE would be a good thing.
-- Keir
A bit more explanation:
- All my L4 tables (kernel and user) have one of their entries pointing
on themselves.
- As I can't use the same tables in kernel and user mode on x86_64, the
kernel table is always the same, and sometimes needs to map a user L4 to
modify.
- In order to do that, i set an entry of the kernel L4 to the machine
address of the wanted L4 user table. So my L4 user recursive entry is
used as a L3 one in kernel tables.
- When i want to access a user table in kernel mode, i do 2 mmu updates:
1/ Set a L4 kernel table entry with the machine address of the L4 user
table i want to change. This step currently works.
2/ Set the L4 user table recursive as valid (i clear the valid bit when
i'm done with my changes, don't want the user to be able to read his
page tables). This is where Xen refuse to update the tables.
About the possible fix, won't something like trying a
get_linear_pagetable() at all level works? Will it cause too much overhead?
Generally speaking, is allowing a R/O mapping of another table the
domain own (whichever level it is) safe? At first thought, i don't see
any way of exploiting it.
Regards,
Mathieu
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|