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

RE: [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. 

--
Mats
> 
> Armand
> 
> 
> 
> 



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


 


Rackspace

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