diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 07:31:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:10 -0500 |
commit | 49a697871e2edcbc9cc682466bc4f2316b854d23 (patch) | |
tree | 220d6b29d46a5f30f077882f0b6d4ae25775f8f2 | |
parent | 70fd93c9d9e07dd2ea4465df76a0ddd414fd21ac (diff) |
x86: turn priviled operation into a macro in head_64.S
under paravirt, read cr2 cannot be issued directly anymore.
So wrap it in a macro, defined to the operation itself in case
paravirt is off, but to something else if we have paravirt
in the game
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/head_64.S | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index b6167fe3330e..c31b1c96a9d3 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -19,6 +19,13 @@ | |||
19 | #include <asm/msr.h> | 19 | #include <asm/msr.h> |
20 | #include <asm/cache.h> | 20 | #include <asm/cache.h> |
21 | 21 | ||
22 | #ifdef CONFIG_PARAVIRT | ||
23 | #include <asm/asm-offsets.h> | ||
24 | #include <asm/paravirt.h> | ||
25 | #else | ||
26 | #define GET_CR2_INTO_RCX movq %cr2, %rcx | ||
27 | #endif | ||
28 | |||
22 | /* we are not able to switch in one step to the final KERNEL ADRESS SPACE | 29 | /* we are not able to switch in one step to the final KERNEL ADRESS SPACE |
23 | * because we need identity-mapped pages. | 30 | * because we need identity-mapped pages. |
24 | * | 31 | * |
@@ -267,7 +274,7 @@ ENTRY(early_idt_handler) | |||
267 | xorl %eax,%eax | 274 | xorl %eax,%eax |
268 | movq 8(%rsp),%rsi # get rip | 275 | movq 8(%rsp),%rsi # get rip |
269 | movq (%rsp),%rdx | 276 | movq (%rsp),%rdx |
270 | movq %cr2,%rcx | 277 | GET_CR2_INTO_RCX |
271 | leaq early_idt_msg(%rip),%rdi | 278 | leaq early_idt_msg(%rip),%rdi |
272 | call early_printk | 279 | call early_printk |
273 | cmpl $2,early_recursion_flag(%rip) | 280 | cmpl $2,early_recursion_flag(%rip) |