Mini-OS return from exception fix
PATCH 1/1 Mini-OS return from exception fix
In reply to a message not in the archiveThis patch fixes ret_from_exception routine. Stack consistency is now preserved.
Signed-off-by Grzegorz Milos <[email protected]>
Keir could you apply? Thanks.
Gregor
Quoted 2 lines
I've modified minios to do dynamic page fault handling rather than setup all the page tables ahead of time (just to improve my understanding) but it's crashing on return and looks like the stack may be wrong. Before I dive in the assembler code, is the code in
x86_32.Satpage_faultandret_from_exceptionexpected to work if the fault is fixed up?
extras/mini-os/arch/x86/x86_32.S +4 -5
@@ -69,7 +69,7 @@ CS = 0x2C popl %ds; \ popl %es; \ addl $4,%esp; \ - iret; \ + iret; ENTRY(divide_error) pushl $0 # no error code
@@ -101,10 +101,9 @@ do_exception: jmp ret_from_exception ret_from_exception: - movb CS(%esp),%cl - test $2,%cl # slow return to ring 2 or 3 - jne safesti - RESTORE_ALL + movb CS(%esp),%cl + addl $8,%esp + RESTORE_ALL # A note on the "critical region" in our callback handler. # We want to avoid stacking callback handlers due to events occurring
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel