From: Grzegorz Milos <gm281@cam.ac.uk>
To: Mick.Jordan@sun.com, xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] Mini-OS return from exception fix
Date: Fri, 02 Feb 2007 10:56:14 +0000 [thread overview]
Message-ID: <45C318CE.3070104@cam.ac.uk> (raw)
In-Reply-To: <45C22150.90402@Sun.COM>
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
This patch fixes ret_from_exception routine. Stack consistency is now
preserved.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Keir could you apply? Thanks.
Gregor
> 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.S at page_fault and
> ret_from_exception expected to work if the fault is fixed up?
>
[-- Attachment #2: mini-os.patch --]
[-- Type: text/plain, Size: 753 bytes --]
diff -r 8690e3448971 -r 25619d57eaa5 extras/mini-os/arch/x86/x86_32.S
--- a/extras/mini-os/arch/x86/x86_32.S Wed Jan 17 15:09:50 2007 +0000
+++ b/extras/mini-os/arch/x86/x86_32.S Fri Feb 02 10:50:20 2007 +0000
@@ -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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
parent reply other threads:[~2007-02-02 10:56 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <45C22150.90402@Sun.COM>]
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=45C318CE.3070104@cam.ac.uk \
--to=gm281@cam.ac.uk \
--cc=Mick.Jordan@sun.com \
--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.