From: Tim Deegan Subject: Re: Re: Re:Re:Re: Questions about shadow page table. Date: Wed, 27 May 2009 10:40:57 +0100 Message-ID: <20090527094057.GD16056@york.uk.xensource.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> <1182088.377301243415442619.JavaMail.coremail@bj163app26.163.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: <1182088.377301243415442619.JavaMail.coremail@bj163app26.163.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: Wu Bingzheng Cc: xen-devel List-Id: xen-devel@lists.xenproject.org At 10:10 +0100 on 27 May (1243419042), Wu Bingzheng wrote: > ??2009-05-27??"Tim Deegan" ?????? > >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. Actually, all "goto propagate" paths in sh_page_fault() do this too; the not_a_shadow_fault label also has some lock handling that's required on some paths. > Thanks. Would you like to point out where exactly to make the > decision? Typical guest faults are caught at the first "goto propagate", based on the return code of sh_walk_guest_tables(). Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]