WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Shadow Page Tables in Xen

To: priya sehgal <priyagps@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Shadow Page Tables in Xen
From: Tej <bewith.tej@xxxxxxxxx>
Date: Tue, 21 Apr 2009 19:16:33 +0530
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 21 Apr 2009 06:46:56 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Gi4eGDzRt76lMhtg+8bgGtbzcgscASSHP9sInLn53gA=; b=Cn0Zdk8NCQq0DQZCdKl+9CiwBsWu/nzZuy+IGXnIcc/Y2JXTQX0//dwYQpTND+0hc5 QwHAEnkeVb3cp7BwJBBDlP+iJFJR+E636HKhi80MYA0b1k/i3o6uXUbnt6TFHQVYyl2M Bqk6Hf1LW8q+wwqZYWAjKZQEqSdxJoTjeU/AY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d4OTTUbe7+sbY41eZ9FUvuOP/O+3FD2G26aCMLYSnsUBRYAhVtW6BPRz0RITr4w0Y1 x20vqe9yxHT8j62wLcFduIZRobBYwxa5vl14GW0jbuUJS1NKVWHoJjZz0e77WR/829OB QZn/hBn4eNpjPQpTqryGnhqppc0U6q01gLXdE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <67822.80752.qm@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <67822.80752.qm@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Apr 21, 2009 at 1:04 AM, priya sehgal <priyagps@xxxxxxxxxxx> 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 
> machine 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 only 
> the pages containing the "guest page table" are write protected (to check 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’s page-fault behaviour
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 works 
> for HVM guests. In this case also, xen will need to keep a shadow page table, 
> which should detect which pages have been modified since the last time 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 are 
> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

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