From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xen-devel@lists.xen.org
Subject: Re: The entry of Xen's exception handler
Date: Tue, 2 Oct 2012 22:23:05 +0100 [thread overview]
Message-ID: <506B5B39.4010205@citrix.com> (raw)
In-Reply-To: <CAJJWZczK3+KWcuk8yvjr6AXtkBkPgzUTrnqp0+FhQcf=s00e_A@mail.gmail.com>
On 02/10/2012 21:51, Xinxin Jin wrote:
> Hi, I am trying to understand the exception handler of Xen. In
> xen/arch/x86/x86_64/entry.S, the entry of the page fault handler is :
>
> ENTRY(page_fault)
> movl $TRAP_page_fault,4(%rsp)
> jmp handle_exception
>
> Here I did not get why to put the exception vector ($TRAP_page_fault)
> to stack before calling handle_exception?
This is so every single exception fills in its cpu_user_regs with the
correct trap, so the C code an distinguish if its needs to. (See
current.h for the structures which get filled in)
~Andrew
>
> Thanks,
>
> --
> Xinxin
>
next prev parent reply other threads:[~2012-10-02 21:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 20:51 The entry of Xen's exception handler Xinxin Jin
2012-10-02 21:23 ` Andrew Cooper [this message]
2012-10-02 21:30 ` Keir Fraser
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=506B5B39.4010205@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.