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/
Home Products Support Community News


RE: [Xen-devel] More page-table questions.

To: "PUCCETTI Armand" <armand.puccetti@xxxxxx>, "Keir Fraser" <keir@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] More page-table questions.
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Mon, 12 Mar 2007 18:42:56 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 12 Mar 2007 10:42:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45F58D7D.6090703@xxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acdky6rzK0hZt8fSR2SLeqW8+Vq0ZQAAdZLQ
Thread-topic: [Xen-devel] More page-table questions.

> -----Original Message-----
> From: PUCCETTI Armand [mailto:armand.puccetti@xxxxxx] 
> Sent: 12 March 2007 17:27
> To: Keir Fraser
> Cc: Petersson, Mats; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] More page-table questions.
> Keir Fraser a écrit :
> > On 12/3/07 16:26, "Petersson, Mats" <Mats.Petersson@xxxxxxx> wrote:
> >
> >   
> >> Are the page-tables ever updated directly by the guest, or 
> is it all
> >> done via hyper-calls?
> >>     
> >
> > Leaf PTEs (i.e., really just PTEs, not PDEs) can be 
> directly written from
> > the point-of-view of the guest. In fact they are trapped 
> and emulated by
> > Xen. The guest is somewhat aware of this because it has explicitly
> > write-protected all its pagetables, so if it were to 
> attempt the direct
> > write on native hardware in these circumstances it would 
> receive a page
> > fault.
> >
> >  -- Keir
> >
> >
> >   
> This is unclear to me: "a guest believes he can write PTEs" means that
> his source code to access the page tables is left unchanged between 
> legacy and PV version?
> Merely, the hypervisor traps the guest's accesses to the page 
> tables, to 
> control
> what he is doing (e.g. not overlapping any other domain's pages) and 
> allowing or denying
> any writes. This should apply to any page table level, so why only 
> blocking writes to PTEs?

No, it's the other way around (and I'm sure Keir will correct me if I'm wrong). 
The guest is not allowed to write AT ALL to the upper levels of the page-table 
(aside from via hypercalls). So, code in the guest can be unmodified as long as 
it's touching just the bottom level of page-table (i.e. the individual 4K page).

> This is for 4K pages, but how are 2M pages mixed? or do we 
> assume that 
> every domain pages
> are 4K?

As far as I know, Xen _ONLY_ supports small pages (4K), no large page support 
at present. 

> Armand

Xen-devel mailing list