All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Ropert <mro@adviseo.fr>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: [RFC] event channels and xen callbacks
Date: Thu, 06 Apr 2006 17:12:58 +0200	[thread overview]
Message-ID: <44352FFA.8020704@adviseo.fr> (raw)
In-Reply-To: <c8101a489dc2c5f538cfde5c723a8b62@cl.cam.ac.uk>

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

  reply	other threads:[~2006-04-06 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04 16:10 [RFC] event channels and xen callbacks Mathieu Ropert
2006-04-06 14:15 ` Keir Fraser
2006-04-06 15:12   ` Mathieu Ropert [this message]
2006-04-12 15:56   ` Mathieu Ropert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44352FFA.8020704@adviseo.fr \
    --to=mro@adviseo.fr \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.