lkml.org 
[lkml]   [2007]   [Nov]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 31 Oct 2007 21:50:50 -0700
FromJeremy Fitzhardinge <>
SubjectRe: [PATCH 11/16] turn priviled operation into a macro in head_64.S
Glauber de Oliveira Costa wrote:
> 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
> 

Is this actually needed?  It's only used in the early fault handler in
head_64.S.  Will we be taking that path in the paravirt case?  If so,
should we disable the fault handler altogether, since the hypervisor can
probably provide better diagnositcs.

    J
> 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>
> ---
>  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)
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-01 06:07    [from the cache]
©2003-2008