[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Setting up page directories and tables

Dave Pacheco wrote:
> I don't really understand what you mean here. To "pin the whole
> pagetable from L2 down" - does that mean pinning the L2 pagetable page
> itself and then all of the L1 pages, or just the L2 pagetable page?
> What exactly does pinning do? Does it simply ensure that the page
> won't be paged out and that Xen knows it's a page table? If that's the
> case, it seems like you still want to pin L1 pages so that you know
> that Xen is okay with your L1 page table.

"Pinning" is a bit of a misnomer.  What it means is that the pinned page
is always treated as part of an active pagetable (ie, pointed to by
%cr3), so all the normal rules apply: it must be RO, and all updates
must go through Xen and be validated.  This means that Xen doesn't need
to revalidate it when it does become an active pagetable.

By definition, if you pin a pagetable page, you also pin all the other
pagetable pages it refers to.  So if you pin the L2 (L3 for PAE) root
page, then you're pinning the entire pagetable.  You could pin the leaf
L1 pages (ie the ones actually containing pte entries), but there's not
much point.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.