WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [RFC] event channels and xen callbacks

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC] event channels and xen callbacks
From: Mathieu Ropert <mro@xxxxxxxxxx>
Date: Thu, 06 Apr 2006 17:12:58 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 07 Apr 2006 07:25:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <c8101a489dc2c5f538cfde5c723a8b62@xxxxxxxxxxxx>
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>
References: <44329A63.2020808@xxxxxxxxxx> <c8101a489dc2c5f538cfde5c723a8b62@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
Keir Fraser wrote:


On 4 Apr 2006, at 17:10, Mathieu Ropert wrote:

i'm currently playing a bit with event channels and hypervisor callbacks, and i find myself stuck because i miss some informations. Maybe you can give me some hints:

on amd64 arch, i'd like to know about hypervisor callback: ie, stack layout when called by Xen, stack location in memory (is it using the TSS entry as hardware traps do?) and finally, about how HYPERVISOR_iret() expects to find the stack upon call (like when you used iret? or something else?).

I may write a little paper or tutorial from i've learned and didn't found in Xen doc after i get a better view of the whole thing...


1. The stack layout on callback is just as for a native hardware interrupt or exception. Those exceptions that push an error code when running natively also do so when running on Xen, for example.

2. The TSS isn't fully virtualised by Xen -- instead you register your kernel stack with the stack_switch() hypercall. Calling this is equivalent to writing your stack pointer into your TSS when running natively.

3. When calling HYPERVISOR_iret() there should be a iret_context swtructure at the top of the stack. See its definition, and a big comment, in xen/include/public/arch-x86_64.h.

 -- Keir


Thanks Keir, that helped me a lot!


Regards,

Mathieu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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