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] More page-table questions.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] More page-table questions.
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Tue, 13 Mar 2007 16:25:55 +0000
Cc: "Petersson, Mats" <Mats.Petersson@xxxxxxx>, PUCCETTI Armand <armand.puccetti@xxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Delivery-date: Tue, 13 Mar 2007 09:24:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B018E1A5C@xxxxxxxxxxxxxxxxx>
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>
References: <907625E08839C4409CE5768403633E0B018E1A5C@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
> > 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).

The guest doesn't actually do explicit hypercalls in PV these days; it tries 
to write to the page table leaf nodes and these writes cause a fault (because 
the page tables must be mapped read only).  Xen then validates the change 
being made and applies it to the page table.

Guests have to be modified to translate pseudophysical->machine addresses and 
to map pagetables readonly, but they don't make explicit hypercalls anymore 
(although the effect is much the same).

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

Large page support hasn't been figured out yet, so 4K pages is fixed on x86.  
I think the IA64 guys (and maybe PPC?) may have considered large pages (IA64 
at least has a far wider range of allowed page sizes than x86).

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel