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

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



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


 


Rackspace

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