From: "Wu Bingzheng" Subject: Re:Re: Re:Re:Re: Questions about shadow page table. Date: Wed, 27 May 2009 17:10:42 +0800 (CST) Message-ID: <1182088.377301243415442619.JavaMail.coremail@bj163app26.163.com> References: <20090527081217.GB16056@york.uk.xensource.com> <12737400.124241243392478610.JavaMail.coremail@bj163app62.163.com> <3841352.530971243347632779.JavaMail.coremail@bj163app57.163.com> <20090526095459.GA16056@york.uk.xensource.com> <27156115.386171243327618700.JavaMail.coremail@bj163app31.163.com> <22314741.143001243393791075.JavaMail.coremail@bj163app62.163.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1513598519==" Return-path: In-Reply-To: <20090527081217.GB16056@york.uk.xensource.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: Tim Deegan Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============1513598519== Content-Type: multipart/alternative; boundary="----=_Part_102526_26345300.1243415442616" ------=_Part_102526_26345300.1243415442616 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: quoted-printable =D4=DA2009-05-27=A3=AC"Tim Deegan" =D0=B4=B5=C0=A3= =BA >At 04:09 +0100 on 27 May (1243397391), Wu Bingzheng wrote: >> In another word, how can page-fault handler distinguish the >> shadow-page-fault and non-shadow-page-fault? > >By looking at the guest's own pagetables (not the shadows) and the error >code, and figuring out whether this would have been a pagefault on bare >metal. Yes, the not_a_shadow_fault path is for this.=20 Thanks. Would you like to point out where exactly to make the decision? I guess this should be at the beginning of sh_page_fault(), and also out of= =20 the [#if SHADOW_OPTIMIZATIONS, #endif], but I didn't find it. Is it sh_mfn_is_a_page_table() ?=20 Thanks, Wu > >> When reading it's code, I skip all the code enabled only #if >> SHADOW_OPTIMIZATIONS, is that ok? > >You'll miss out on some quite major changes to the shadow code (the >whole of what's been called "shadow 3"), but it should still make sense.= =20 > >Cheers, > >Tim. > >--=20 >Tim Deegan >Principal Software Engineer, Citrix Systems (R&D) Ltd. >[Company #02300071, SL9 0DZ, UK.] ------=_Part_102526_26345300.1243415442616 Content-Type: text/html; charset=gbk Content-Transfer-Encoding: quoted-printable =D4=DA2009-05-27=A3=AC"Tim Deegan" <Tim.Deegan@citrix.com>&= nbsp;=D0=B4=B5=C0=A3=BA
>At 04:09 +0100 on 27&nbs= p;May (1243397391), Wu Bingzheng wrote:
>>&nbs= p;In another word, how can page-fault handler=  distinguish the
>> shadow-page-fault and = ;non-shadow-page-fault?
>
>By looking at the&nbs= p;guest's own pagetables (not the shadows) an= d the error
>code, and figuring out whe= ther this would have been a pagefault on=  bare
>metal.  Yes, the not_a_shadow_fault&n= bsp;path is for this. 

Thanks. Would y= ou like to point out where exactly to&nb= sp;make the decision?
I guess this should = be at the beginning of sh_page_fault(), and&n= bsp;also out of 
the [#if SHADOW_OPTIMIZATIONS,=  #endif], but I didn't find it.
Is it=  sh_mfn_is_a_page_table() ? 

Thanks,
Wu

>
>> When reading it's code, I s= kip all the code enabled only #if
>>=  SHADOW_OPTIMIZATIONS, is that ok?
>
>You'l= l miss out on some quite major changes&n= bsp;to the shadow code (the
>whole of w= hat's been called "shadow 3"), but it sh= ould still make sense. 
>
>Cheers,
><= br>>Tim.
>
>-- 
>Tim Deegan <Tim.Dee= gan@citrix.com>
>Principal Software Engineer, Citri= x Systems (R&D) Ltd.
>[Company #02300071,&nbs= p;SL9 0DZ, UK.]


=B4=A9=D4=BD=B5=D8=D5=F0=B4=F8 =BC=CD=C4=EE=E3=EB=B4=A8=B5=D8=D5=F0= =D2=BB=D6=DC=C4=EA
------=_Part_102526_26345300.1243415442616-- --===============1513598519== 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 --===============1513598519==--