From: Keir Fraser Subject: Re: page fault handling in Xen Date: Sat, 8 Oct 2005 23:34:45 +0100 Message-ID: <0dc9e68e562ecaeefa496d3f5f8e7f93@cl.cam.ac.uk> References: <43484AB8.1010701@cmu.edu> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <43484AB8.1010701@cmu.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jonathan M. McCune" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 8 Oct 2005, at 23:39, Jonathan M. McCune wrote: > We're curious about page fault handling in Xen-devel. In particular, > during kernel boot-up, the kernel tests if the CPU "honours the WP > bit". This causes a page fault with error code 3 (expected behavior). > Does Xen still make a copy of the execution stack frame on the guest > OS stack, as specified in the original "Xen and the Art of > Virtualization" paper? There is a footnote here that suggests that > using a pre-agreed shared memory location might be a better option. > Has this change been implemented? > > After the WP-test page fault is taken, what is supposed to happen from > Xen's perspective on the return from the page fault handler? In > normal linux, the exception handler changes its own return address > (i.e., modifies the EIP register) to be the "fixup" address. Does > this still happen with XenoLinux, or does the hypervisor get involved? Everything works as on native, pretty much, except that the page-fault stack frame is extended by one word to contain the faulting linear address (because the guest cannot directly access %cr2). -- Keir