WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pagetable pinning question

To: Christian Limpach <chris@xxxxxx>
Subject: Re: [Xen-devel] pagetable pinning question
From: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 04 Feb 2004 08:11:26 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx, Ian.Pratt@xxxxxxxxxxxx
Delivery-date: Thu, 05 Feb 2004 06:39:01 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Tue, 03 Feb 2004 20:21:22 +0100." <0b1b01c3ea8a$ea40fd60$070414ac@pin>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> I want to use pinning for the L1/L2 pagetables.  The currently activated
> pagetable maps itself and that works great.  But I (or rather whoever wrote
> the pagetable code) also wants to map inactive pagetables and this doesn't
> work because of the following check in get_twisted_l2_table:
>     if ( (l2v >> PAGE_SHIFT) != entry_pfn )
>     {
>         MEM_LOG("L2 tables may not map _other_ L2 tables!\n");
> 
> Are there counting or protection issues why this is disallowed or was it
> just not needed for Linux/Windows?

Interesting. I guess as well as having a linear mapping [*] of
it's current page table, NetBSD reserves a page directory slot
for creating temporary linear mappings of other page tables it
wants to manipulate (e.g. during fork etc).

Like anything to do with linear mappings, figuring this out is
going to require a damp towel wrapped around one's head...

If the other L2 is pinned, I think its safe to allow. However, if
it's not things are going to get ugly (and slow).

> I guess a work around would be to switch to the inactive pagetable and
> switch back when the mapping is no longer needed...

I suspect it wants both linear mappings in place at the same
time, e.g. for doing a PTE copy.

Can you ensure the other L2 is pinned?

Cheers,
Ian


[*] i.e. it uses a page directory entry to point back to the page
containing the directory. The net result is you end up with a 4MB
VA region that containing a linear mapping of all your PTEs,
which makes manipulating them very easy. Linux does not use
linear mappings at all, but XP does.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel