* The entry of Xen's exception handler
@ 2012-10-02 20:51 Xinxin Jin
2012-10-02 21:23 ` Andrew Cooper
2012-10-02 21:30 ` Keir Fraser
0 siblings, 2 replies; 3+ messages in thread
From: Xinxin Jin @ 2012-10-02 20:51 UTC (permalink / raw)
To: Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 356 bytes --]
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?
Thanks,
--
Xinxin
[-- Attachment #1.2: Type: text/html, Size: 508 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: The entry of Xen's exception handler
2012-10-02 20:51 The entry of Xen's exception handler Xinxin Jin
@ 2012-10-02 21:23 ` Andrew Cooper
2012-10-02 21:30 ` Keir Fraser
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2012-10-02 21:23 UTC (permalink / raw)
To: xen-devel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: The entry of Xen's exception handler
2012-10-02 20:51 The entry of Xen's exception handler Xinxin Jin
2012-10-02 21:23 ` Andrew Cooper
@ 2012-10-02 21:30 ` Keir Fraser
1 sibling, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2012-10-02 21:30 UTC (permalink / raw)
To: Xinxin Jin, Xen-devel
On 02/10/2012 21:51, "Xinxin Jin" <xinxinjin89@gmail.com> 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?
Otherwise handle_exception would not know which type of exception it was
handling, would it.
-- Keir
> Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-02 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 20:51 The entry of Xen's exception handler Xinxin Jin
2012-10-02 21:23 ` Andrew Cooper
2012-10-02 21:30 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).