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

Re: [Xen-devel] page fault handling in Xen



At 14:39 +0530 on 02 Mar (1172846389), jeet wrote:
> As per my understanding when guest can update it own page table without 
> causing VM exit in xen

No -- once a page is recognised as a page table by Xen, the guest is no
longer allowed to write directly to it.  We trap and emulate any
instructions that write to known page tables, so that we can keep the
shadow page tables up to date.

> when some process requires some memory (pages) this will cause page fault and 
> control goes to guest OS
> the guest then allocate page from its own psuedo address space and make 
> entries in guest page table which contain
> mapping of virtual to psuedo physical memory and
> 
> But when actual write occurs to that page, page fault occurs which will cause 
> vm exit in xen.
> 
> Xen then will update the page mfn in shadow page table and return control 
> back to guest by vn entry.
> 
> Is this understanding it correct? so there would be only one vn exit/entry?

There are at least two VMEXITs needed.  Typically the first is for
the original page fault, which is reflected back to the guest.  The
second is caused by the guest's fault-handler writing to guest
pagetables; Xen intercepts that write and updates the shadow pagetables
to match.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508

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