All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Limpach <chris@pin.lu>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.sourceforge.net, Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Subject: Re: pagetable pinning question
Date: Wed, 4 Feb 2004 15:43:43 +0100	[thread overview]
Message-ID: <0c0901c3eb2d$4ba90690$070414ac@pin> (raw)
In-Reply-To: E1AoI86-0005IH-00@wisbech.cl.cam.ac.uk

> 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

  reply	other threads:[~2004-02-04 14:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-03 19:21 pagetable pinning question Christian Limpach
2004-02-04  8:11 ` Ian Pratt
2004-02-04 14:43   ` Christian Limpach [this message]
2004-02-04  8:16 ` Keir Fraser
2004-02-04  8:21   ` Keir Fraser
2004-02-04 16:29     ` Bin Ren
2004-02-06  1:28       ` Zachary Amsden
2004-02-06  1:43         ` Bin Ren
2004-02-04 14:44   ` Christian Limpach
2004-02-04 17:17     ` Keir Fraser
2004-02-04 22:19       ` Christian Limpach
2004-02-04 23:06         ` Ian Pratt
2004-02-05 14:35         ` Keir Fraser
2004-02-05 15:25           ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='0c0901c3eb2d$4ba90690$070414ac@pin' \
    --to=chris@pin.lu \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.