From: Keir Fraser Subject: Re: Switching to user mode from domU kernel Date: Mon, 01 Oct 2007 06:24:07 +0100 Message-ID: References: <20070930201143.GC31619@osresearch.net> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070930201143.GC31619@osresearch.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Trammell Hudson , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 30/9/07 21:11, "Trammell Hudson" wrote: > Am I not jumping into user space correctly? Is there something > else that my code should do to make the transition? It sounds like event delivery is masked before the iret, and then you have IF set in the RFLAGS value in the iret frame, which causes event delivery to be unmasked during iret. > I am passing flags==0 and only push the values for flags, CS:RIP, > RFLAGS, and SS:RSP. If I push values for RAX, R11, and RCX on the > stack the kernel ends up in all sorts of weird places rather than > my intended RIP and RSP. That doesn't make sense. The iret implementation (for an x86/64 guest) always expects RAX/R11/RCX on the stack. -- Keir