From: jeet Subject: Re: page fault handling in Xen Date: Fri, 2 Mar 2007 17:36:28 +0530 (IST) Message-ID: <661148.41220.qm@web8807.mail.in.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi Tim =0A=0AThanks for your prompt reply.=0A=0ABut I am currently looking = into xen 3.0.3.=0A=0AIs shadow code implementation in xen 3.0.3 is same as = explained by you in reply?=0A=0A=0A=0AJeet=0A=0A----- Original Message ----= =0AFrom: Tim Deegan =0ATo: jeet =0ACc: xen-devel@lists.xensource.com=0ASent: Friday, 2 March, 2007 3= :06:46 PM=0ASubject: Re: [Xen-devel] page fault handling in Xen=0A=0AAt 14:= 39 +0530 on 02 Mar (1172846389), jeet wrote:=0A> As per my understanding wh= en guest can update it own page table without causing VM exit in xen=0A=0AN= o -- once a page is recognised as a page table by Xen, the guest is no=0Alo= nger allowed to write directly to it. We trap and emulate any=0Ainstructio= ns that write to known page tables, so that we can keep the=0Ashadow page t= ables up to date.=0A=0A> when some process requires some memory (pages) thi= s will cause page fault and control goes to guest OS=0A> the guest then all= ocate page from its own psuedo address space and make entries in guest page= table which contain=0A> mapping of virtual to psuedo physical memory and= =0A> =0A> But when actual write occurs to that page, page fault occurs whic= h will cause vm exit in xen.=0A> =0A> Xen then will update the page mfn in = shadow page table and return control back to guest by vn entry.=0A> =0A> Is= this understanding it correct? so there would be only one vn exit/entry?= =0A=0AThere are at least two VMEXITs needed. Typically the first is for=0A= the original page fault, which is reflected back to the guest. The=0Asecon= d is caused by the guest's fault-handler writing to guest=0Apagetables; Xen= intercepts that write and updates the shadow pagetables=0Ato match.=0A=0AC= heers,=0A=0ATim.=0A=0A-- =0ATim Deegan , XenSourc= e UK Limited=0ARegistered office c/o EC2Y 5EB, UK; company number 05334508= =0A=0A_______________________________________________=0AXen-devel mailing l= ist=0AXen-devel@lists.xensource.com=0Ahttp://lists.xensource.com/xen-devel= =0A=0A=0A=0A=0A=0A=09=09=0A________________________________________________= __________=0AYahoo! India Answers: Share what you know. Learn something new= =0Ahttp://in.answers.yahoo.com/