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: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] pagetable pinning question
From: Christian Limpach <chris@xxxxxx>
Date: Wed, 4 Feb 2004 15:43:43 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Delivery-date: Wed, 04 Feb 2004 14:54:19 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
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>
References: <E1AoI86-0005IH-00@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> 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).

yes, there is a function which returns the VA where the requested page table
is linearly mapped.  For the kernel's page table and for the current page,
this always returns the current page table's linear mapping VAFor any other
page table, the alternate page directory linear mapping slot is changed and
the VA of the corresponding memory is returned.

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

oh yes...

> 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).

It is, I'm pinning the L2 tables right after they are created.  All page
directories are pinned all the time and I'm now always using mmu_update to
make changes.  I've removed the check in my Xen and so far this works quite
well...

> > 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.

As far as I can tell we only need access to one linear mapping at a time.  I
suspect the motivation for having the alternate mapping is avoiding the
switch of the table and keeping the code simple (no special treatment for
inactive page tables).

     christian



-------------------------------------------------------
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

<Prev in Thread] Current Thread [Next in Thread>