From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Jan Beulich <JBeulich@suse.com>, Keir Fraser <keir@xen.org>
Subject: x86_64: Fix double fault stack setup
Date: Thu, 24 May 2012 15:59:14 +0100 [thread overview]
Message-ID: <4FBE4CC2.2090606@citrix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]
x86_64: Fix double fault stack setup.
Dont forget to push error_code and entry_vector onto the stack for a double
fault. If it is missed, the register information printed looks like
(XEN) CPU: 0
(XEN) RIP: 0246:[<000000000000e008>] ???
(XEN) RFLAGS: ffff82c480287eb8
(XEN) rax: 0000000000000282 rbx: ffff82c480242dd0 rcx: 0000000000000282
(XEN) rdx: 0000000000000000 rsi: 0000000000000282 rdi: 0000000000000031
(XEN) rbp: 0000000000000031 rsp: 0000000000000000 r8: ffff83007ee52488
(XEN) r9: ffff83007ee61088 r10: 0000000000000007 r11: ffff82c480116460
(XEN) r12: 0000000000000000 r13: ffff82c4802c37e0 r14: 00026501a9ced0b8
(XEN) r15: ffff82c4802c37c0 cs: 0000000000000246 ss: 0000000000000000
which incorrectly displays cs, rip, rflags and rsp; the useful pieces of
information when trying to identify the cause of a double fault.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff -r 69c3ae25bb1d xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -595,6 +595,8 @@ ENTRY(spurious_interrupt_bug)
jmp handle_exception
ENTRY(double_fault)
+ pushq $0
+ movl $TRAP_double_fault,4(%rsp)
SAVE_ALL
movq %rsp,%rdi
call do_double_fault
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
[-- Attachment #2: x86_64-double-fault-stack.patch --]
[-- Type: text/x-patch, Size: 1356 bytes --]
# HG changeset patch
# Parent 69c3ae25bb1ddcb0ea44b7566d36d34e9d6a70aa
x86_64: Fix double fault stack setup.
Dont forget to push error_code and entry_vector onto the stack for a double
fault. If it is missed, the register information printed looks like
(XEN) CPU: 0
(XEN) RIP: 0246:[<000000000000e008>] ???
(XEN) RFLAGS: ffff82c480287eb8
(XEN) rax: 0000000000000282 rbx: ffff82c480242dd0 rcx: 0000000000000282
(XEN) rdx: 0000000000000000 rsi: 0000000000000282 rdi: 0000000000000031
(XEN) rbp: 0000000000000031 rsp: 0000000000000000 r8: ffff83007ee52488
(XEN) r9: ffff83007ee61088 r10: 0000000000000007 r11: ffff82c480116460
(XEN) r12: 0000000000000000 r13: ffff82c4802c37e0 r14: 00026501a9ced0b8
(XEN) r15: ffff82c4802c37c0 cs: 0000000000000246 ss: 0000000000000000
which incorrectly displays cs, rip, rflags and rsp; the useful pieces of
information when trying to identify the cause of a double fault.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff -r 69c3ae25bb1d xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -595,6 +595,8 @@ ENTRY(spurious_interrupt_bug)
jmp handle_exception
ENTRY(double_fault)
+ pushq $0
+ movl $TRAP_double_fault,4(%rsp)
SAVE_ALL
movq %rsp,%rdi
call do_double_fault
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2012-05-24 14:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 14:59 Andrew Cooper [this message]
2012-05-24 15:14 ` x86_64: Fix double fault stack setup Jan Beulich
2012-05-24 15:28 ` Andrew Cooper
2012-05-24 15:46 ` Jan Beulich
2012-05-24 16:12 ` Andrew Cooper
2012-05-25 10:35 ` Jan Beulich
2012-05-25 11:04 ` Keir Fraser
2012-05-24 18:04 ` Keir Fraser
2012-05-24 18:15 ` Andrew Cooper
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=4FBE4CC2.2090606@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--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.