From: "Jan Beulich" <JBeulich@novell.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] x86: move early page fault code into .init.text
Date: Thu, 16 Dec 2010 16:09:46 +0000 [thread overview]
Message-ID: <4D0A47DA020000780002870D@vpn.id2.novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1320,7 +1320,7 @@ asmlinkage void do_page_fault(struct cpu
* during early boot (an issue was seen once, but was most likely a hardware
* problem).
*/
-asmlinkage void do_early_page_fault(struct cpu_user_regs *regs)
+asmlinkage void __init do_early_page_fault(struct cpu_user_regs *regs)
{
static int stuck;
static unsigned long prev_eip, prev_cr2;
--- a/xen/arch/x86/x86_32/entry.S
+++ b/xen/arch/x86/x86_32/entry.S
@@ -544,6 +544,7 @@ ENTRY(spurious_interrupt_bug)
pushl $TRAP_spurious_int<<16
jmp handle_exception
+ .pushsection .init.text, "ax", @progbits
ENTRY(early_page_fault)
SAVE_ALL(1f,1f)
1: movl %esp,%eax
@@ -551,6 +552,7 @@ ENTRY(early_page_fault)
call do_early_page_fault
addl $4,%esp
jmp restore_all_xen
+ .popsection
handle_nmi_mce:
#ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -591,11 +594,13 @@ ENTRY(double_fault)
call do_double_fault
ud2
+ .pushsection .init.text, "ax", @progbits
ENTRY(early_page_fault)
SAVE_ALL
movq %rsp,%rdi
call do_early_page_fault
jmp restore_all_xen
+ .popsection
handle_ist_exception:
SAVE_ALL
[-- Attachment #2: x86-early-page-fault-init.patch --]
[-- Type: text/plain, Size: 1455 bytes --]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1320,7 +1320,7 @@ asmlinkage void do_page_fault(struct cpu
* during early boot (an issue was seen once, but was most likely a hardware
* problem).
*/
-asmlinkage void do_early_page_fault(struct cpu_user_regs *regs)
+asmlinkage void __init do_early_page_fault(struct cpu_user_regs *regs)
{
static int stuck;
static unsigned long prev_eip, prev_cr2;
--- a/xen/arch/x86/x86_32/entry.S
+++ b/xen/arch/x86/x86_32/entry.S
@@ -544,6 +544,7 @@ ENTRY(spurious_interrupt_bug)
pushl $TRAP_spurious_int<<16
jmp handle_exception
+ .pushsection .init.text, "ax", @progbits
ENTRY(early_page_fault)
SAVE_ALL(1f,1f)
1: movl %esp,%eax
@@ -551,6 +552,7 @@ ENTRY(early_page_fault)
call do_early_page_fault
addl $4,%esp
jmp restore_all_xen
+ .popsection
handle_nmi_mce:
#ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -591,11 +594,13 @@ ENTRY(double_fault)
call do_double_fault
ud2
+ .pushsection .init.text, "ax", @progbits
ENTRY(early_page_fault)
SAVE_ALL
movq %rsp,%rdi
call do_early_page_fault
jmp restore_all_xen
+ .popsection
handle_ist_exception:
SAVE_ALL
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2010-12-16 16:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4D0A47DA020000780002870D@vpn.id2.novell.com \
--to=jbeulich@novell.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 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).