From: Tej Subject: Re: Shadow Page Tables in Xen Date: Tue, 21 Apr 2009 19:16:33 +0530 Message-ID: References: <67822.80752.qm@web8406.mail.in.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <67822.80752.qm@web8406.mail.in.yahoo.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: priya sehgal Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Apr 21, 2009 at 1:04 AM, priya sehgal wrote: > > Hi, > I was going through the memory management in Xen and little confused > about shadow page tables for HVM guest and how they work. > Few of my questions are : > 1. A shadow page table, is a copy of the guest page table, with actual ma= chine frame numbers (MFN), as against the physical page number(PFN) in case= of guests. yes thats true. > Do the shadow page tables write protect each of the PTE it contains, or o= nly the pages containing the "guest page table" are write protected (to che= ck if the guest has modified any entry)? Its gPT that is write protected and it is one of the mechanism to detect the gPT modification to keep sPT and gPT in sync. others mechanisms are like syncing based on processor=92s page-fault behavi= our Hypervisor has to sync accessed and PTE dirty bit every time there is a change in sPT by processor. As far as the write protection is concerned it does for all the PTE entry in gPT. > > 2. I know that live migration is supported on xen, but not sure if it wor= ks for HVM guests. In this case also, xen will need to keep a shadow page t= able, which should detect which pages have been modified since the last tim= e the pages were migrated. For this, shadow page table should mark all the = PTEs as write protected. Does xen implement live migration of HVM guests in= this way ? > If yes, then is this shadow table same as the one used in (1), or there a= re multiple copies of the shadow tables for different purposes? Yes its hypervisor job to keep sPT and gPT in sync during migration. > > Thanks. > Priya > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >