From: "Wu Bingzheng" Subject: page fault in shadow page-table Date: Wed, 3 Jun 2009 14:12:18 +0800 (CST) Message-ID: <32260285.258251244009538382.JavaMail.coremail@bj163app80.163.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0171474015==" 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: xen-devel List-Id: xen-devel@lists.xenproject.org --===============0171474015== Content-Type: multipart/alternative; boundary="----=_Part_69927_23947409.1244009538380" ------=_Part_69927_23947409.1244009538380 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit Hi, I am reading shadow memory code in Xen 3.3.0, and have a question. In HVM guest, if a process writes a non-existing page, what happens: First, page fault occurs, and traps into Xen. Xen finds out that that page doesn't exist in guest page table, so go back to guest. The guest fixes this fault in its page table, and writes that page again. Because that page doesn't exist in shadow page table, so another page fault occurs, and traps into Xen again. Xen finds out it's shadow page fault this time, so it fix this fault in shadow page table, and then go back to guest. At last, the guest writes that page successfully. Am I write? But in debug, I find out that, there are 3 page faults occurs in fact, the first 2 are guest page fault, and the last one is shadow page fault. What step do I miss? Thanks, Wu ------=_Part_69927_23947409.1244009538380 Content-Type: text/html; charset=gbk Content-Transfer-Encoding: quoted-printable Hi,

I am reading shadow memory code in=  Xen 3.3.0, and have a question.

In&nb= sp;HVM guest, if a process writes a non-= existing page, what happens:
First, page fault&= nbsp;occurs, and traps into Xen. Xen finds&nb= sp;out that that page doesn't exist in g= uest page table, so go back to guest.The guest fixes this fault in its page&= nbsp;table, and writes that page again. Becau= se that page doesn't exist in shadow pag= e table, so another page fault occurs, a= nd traps into Xen again.
Xen finds out&nbs= p;it's shadow page fault this time, so i= t fix this fault in shadow page table,&n= bsp;and then go back to guest.
At last,&nb= sp;the guest writes that page successfully.
Am I write? 
But in debug, I find&nb= sp;out that, there are 3 page faults occ= urs in fact, the first 2 are guest = page fault, and the last one is shadow&n= bsp;page fault. 

What step do I miss?<= br>
Thanks,
Wu

<= hr/> =D2=B5=CE=F1=B6=A9=B5=A5=C1=F7=CA= =A7=D4=F5=C3=B4=B0=EC=A3=BF ------=_Part_69927_23947409.1244009538380-- --===============0171474015== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0171474015==--