From: Satya Subject: Re: Xeno Linux never pins L1 tables ? Date: Tue, 16 Oct 2007 16:59:26 -0400 Message-ID: References: <471517B9.1040102@goop.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2134788200==" Return-path: In-Reply-To: <471517B9.1040102@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org --===============2134788200== Content-Type: multipart/alternative; boundary="----=_Part_6138_378096.1192568366280" ------=_Part_6138_378096.1192568366280 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 10/16/07, Jeremy Fitzhardinge wrote: > > Satya wrote: > > I'm developing my own 32-bit (no PAE) paravirtualized kernel for xen > > with Mini-OS as a starting point. I am currently working on process > > page table support (equivalent of arch/i386/mm/pgtable-xen.c) and > > mostly following Linux for the moment. I noticed that linux-2.6.18-xen > > never pins an L1 table (a pte), yet __pgd_pin() walks the page > > directory and gives up write access on the kernel mappings of pte > > pages and only pins the pgd page. How do set_pte() and set_pte_at() > > macros work if they are writing directly to the page table entires ? > > do we fault in the kernel to handle this ?! > > Pinning the top level of a pagetable implicitly pins all the lower > levels, so they are all pinned. Wonder what happens if an L1 page is created *after* a PGD is pinned ? I think I have to explicitly pin the L1 page then? or unlikely( does Xen pin it when I map into into the pinned PGD using a hypercall ) ? :) thanks, satya. J > -- http://cs.uic.edu/~spopuri ------=_Part_6138_378096.1192568366280 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 10/16/07, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
Satya wrote:
> I'm developing my own 32-bit (no PAE) paravirtualized kernel for xen
> with Mini-OS as a starting point. I am currently working on process
> page table support (equivalent of arch/i386/mm/pgtable- xen.c) and
> mostly following Linux for the moment. I noticed that linux-2.6.18-xen
> never pins an L1 table (a pte), yet __pgd_pin() walks the page
> directory and gives up write access on the kernel mappings of pte
> pages and only pins the pgd page. How do set_pte() and set_pte_at()
> macros work if they are writing directly to the page table entires ?
> do we fault in the kernel to handle this ?!

Pinning the top level of a pagetable implicitly pins all the lower
levels, so they are all pinned.

Wonder what happens if an L1 page is created *after* a PGD is pinned ? I think I have to explicitly pin the L1 page then? or unlikely( does Xen pin it when I map into into the pinned PGD using a hypercall ) ? :)

thanks,
satya.



 

    J



--
http://cs.uic.edu/~spopuri ------=_Part_6138_378096.1192568366280-- --===============2134788200== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============2134788200==--