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] Different esps

To: Jacob Gorm Hansen <jacob@xxxxxxxx>
Subject: Re: [Xen-devel] Different esps
From: Steven Hand <Steven.Hand@xxxxxxxxxxxx>
Date: Tue, 20 Jan 2004 12:25:47 +0000
Cc: Xen list <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 20 Jan 2004 12:26:57 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Tue, 20 Jan 2004 12:29:35 +0100." <1074598175.1023.49.camel@jacobg>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> On Tue, 2004-01-20 at 12:11, Jacob Gorm Hansen wrote:
> > execution_context_t ctxt;
> > memcpy(&ctxt, get_execution_context(),sizeof(execution_context_t));
> > 
> > printk("esp1 %08lx %08lx\n",ctxt.esp, current->thread.esp1);

So current->thread.esp1 is the stack pointer for ring 1 for the
current domain (aka the 'kernel' stack pointer for xenolinux). 

The equivalent 'stored' version of this is the 'ring1_esp' field in 
a full_execution_context_t. 

ctxt is an 'execution_context_t' which holds the user level (ring 3) 
stack pointer (and other registers). 

> I have tried setting the value of esp1 with the stack_switch hypercall,
> but apparently this is not the one causing the Xen page fault.

The stack_switch hypercall is typically used by GuestOS to tell tell
Xen what it's "kernel" (ring 1) stack (segment + sp) are. It's a bit
like a 'virtual TSS' for each domain (since the ss/sp for ring 1 are
updated from this through each domain schedule). For its use in XenoLinux 
see ./xenolinux-2.4.24-sparse/arch/xeno/kernel/process.c:__switch_to()

The initial ring 1 ss/sp come from the full_execution_context_t in 
the builddomain_t (see ./xen/common/domain.c:final_setup_guestos()) 

Anyway, can you post -

  a) what it is you're trying to do in detail (I'm guessing it's 
     to do with migration but not sure what stage you're at) and 

  b) the console output leading up to your crash (xen and XL output
     if possible/relevant). 

You might also like to look at ./tools/xc/lib/xc_linux_{save,restore}.c 
to see how it works/ed in our version. 



The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
Xen-devel mailing list

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