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 <[email protected]> Signed-off-by: Steven Rostedt <[email protected]> Acked-by: Jeremy Fitzhardinge <[email protected]> --- 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 b6167fe..c31b1c9 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -19,6 +19,13 @@ #include <asm/msr.h> #include <asm/cache.h> +#ifdef CONFIG_PARAVIRT +#include <asm/asm-offsets.h> +#include <asm/paravirt.h> +#else +#define GET_CR2_INTO_RCX movq %cr2, %rcx +#endif + /* we are not able to switch in one step to the final KERNEL ADRESS SPACE * because we need identity-mapped pages. * @@ -267,7 +274,7 @@ ENTRY(early_idt_handler) xorl %eax,%eax movq 8(%rsp),%rsi # get rip movq (%rsp),%rdx - movq %cr2,%rcx + GET_CR2_INTO_RCX leaq early_idt_msg(%rip),%rdi call early_printk cmpl $2,early_recursion_flag(%rip) -- 1.4.4.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- [PATCH 20/24] tweak io_64.h for paravirt.
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 20/24] tweak io_64.h for paravirt.
- References:
- [PATCH 0/24] paravirt_ops for unified x86 - that's me again!
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 1/24] mm/sparse-vmemmap.c: make sure init_mm is included
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 2/24] irqflags consolidation
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 3/24] consolidate spinlock.h
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 4/24] tlb functions consolidation
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 5/24] smp x86 consolidation
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 6/24] Add debugreg/load_rsp native hooks
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 7/24] consolidate msr.h
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 8/24] consolidate system.h
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 9/24] Wipe out traditional opt from x86_64 Makefile
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 10/24] paravirt hooks at entry functions.
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 11/24] read/write_crX, clts and wbinvd for 64-bit paravirt
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 12/24] provide native irq initialization function
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 13/24] report ring kernel is running without paravirt
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 14/24] export math_state_restore
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 15/24] native versions for set pagetables
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 16/24] add native functions for descriptors handling
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 17/24] This patch add provisions for time related functions so they
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 18/24] export cpu_gdt_descr
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 0/24] paravirt_ops for unified x86 - that's me again!
- Prev by Date: [PATCH 5/24] smp x86 consolidation
- Next by Date: [PATCH 17/24] This patch add provisions for time related functions so they
- Previous by thread: [PATCH 18/24] export cpu_gdt_descr
- Next by thread: [PATCH 20/24] tweak io_64.h for paravirt.
- Index(es):