From: Tim Deegan Subject: Re: Entry points for updates to shadow PTs Date: Fri, 2 May 2008 09:56:17 +0100 Message-ID: <20080502085617.GB5381@york.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mike Sun Cc: xen-devel List-Id: xen-devel@lists.xenproject.org At 00:15 -0400 on 02 May (1209687305), Mike Sun wrote: > In which places can shadow PTEs be changed and/or where is the best > place for me to check to see if I must remark them read-only for my > purposes? Maybe in a low level function like "shadow_set_l1e"? Shadow PTEs are calculated from guest PTEs in _sh_propagate(): anywhere that we write a shadow entry, it should have come from a call to one of the propagate_from_guest() functions, which all end up in _sh_propagate(). There's already a clause in that function to remove the _PAGE_RW bit if the target page hasn't been marked dirty and log-dirty mode is enabled. Extending that should be enough. The tricky part, I would have thought, is finding all the places where guest memory is written without going via the shadow pagetables. Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]