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

Re: [Xen-devel] pagetable pinning question



> 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


 


Rackspace

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