From: Mark Williamson Subject: Re: where is writable page table implemented? Date: Tue, 25 Mar 2008 16:30:59 +0000 Message-ID: <200803251630.59460.mark.williamson@cl.cam.ac.uk> References: <20080324162510.GD30315@york.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline 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@lists.xensource.com Cc: weiming , Tim Deegan List-Id: xen-devel@lists.xenproject.org > 2) in ptwr_do_page_fault(), it should disconnect the page from page > directory and then mark the page as writable. Where are they done? In > x86_emulate()? The disconnection was originally implemented so that guests could make further writes to that page without incurring any more traps into Xen. The goal was to improve the performance of batch pagetable changes (e.g. when a fork() is being performed). This approach was abandoned in favour of trapping every direct pagetable write, and having guests explicitly hypercall into Xen when they really do want to modify a batch of pages. This reduced the overheads in the usual case when the guest is only modifying a small number of pagetable entries. The new approach gives an overall performance benefit but is ABI compatible with guests from before this change (they just won't get the batching). Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)