This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Switching to user mode from domU kernel

To: Trammell Hudson <hudson@xxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Switching to user mode from domU kernel
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 01 Oct 2007 06:24:07 +0100
Delivery-date: Sun, 30 Sep 2007 22:19:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070930201143.GC31619@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgD60nGiIR1pm/eEdySqAAWy6hiGQ==
Thread-topic: [Xen-devel] Switching to user mode from domU kernel
User-agent: Microsoft-Entourage/
On 30/9/07 21:11, "Trammell Hudson" <hudson@xxxxxxxxxxxxxx> 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

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>