All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, glommer@gmail.com, tglx@linutronix.de,
	mingo@elte.hu, ehabkost@redhat.com, jeremy@goop.org,
	avi@qumranet.com, anthony@codemonkey.ws,
	virtualization@lists.linux-foundation.org, rusty@rustcorp.com.au,
	ak@suse.de, chrisw@sous-sol.org, rostedt@goodmis.org,
	hpa@zytor.com, zach@vmware.com, roland@redhat.com,
	Glauber de Oliveira Costa <gcosta@redhat.com>
Subject: [PATCH 3/6] turn priviled operation into a macro in head_64.S
Date: Wed, 12 Dec 2007 10:57:24 -0200	[thread overview]
Message-ID: <11974642682229-git-send-email-gcosta@redhat.com> (raw)
In-Reply-To: <11974642622800-git-send-email-gcosta@redhat.com>

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


  reply	other threads:[~2007-12-12 15:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12 12:57 [PATCH 0/6] paravirt patches - the non-integration part Glauber de Oliveira Costa
2007-12-12 12:57 ` [PATCH 1/6] export math_state_restore Glauber de Oliveira Costa
2007-12-12 12:57 ` Glauber de Oliveira Costa
2007-12-12 12:57   ` [PATCH 2/6] export cpu_gdt_descr Glauber de Oliveira Costa
2007-12-12 12:57     ` Glauber de Oliveira Costa [this message]
2007-12-12 12:57       ` [PATCH 4/6] prepare time related functions for paravirt Glauber de Oliveira Costa
2007-12-12 12:57       ` Glauber de Oliveira Costa
2007-12-12 12:57         ` [PATCH 5/6] tweak io_64.h " Glauber de Oliveira Costa
2007-12-12 12:57           ` [PATCH 6/6] prepare x86_64 architecture initialization " Glauber de Oliveira Costa
2007-12-12 12:57           ` Glauber de Oliveira Costa
2007-12-12 12:57         ` [PATCH 5/6] tweak io_64.h " Glauber de Oliveira Costa
2007-12-12 12:57     ` [PATCH 3/6] turn priviled operation into a macro in head_64.S Glauber de Oliveira Costa
2007-12-12 12:57   ` [PATCH 2/6] export cpu_gdt_descr Glauber de Oliveira Costa
2007-12-12 17:07 ` [PATCH 0/6] paravirt patches - the non-integration part Ingo Molnar
2007-12-12 17:07 ` Ingo Molnar

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=11974642682229-git-send-email-gcosta@redhat.com \
    --to=gcosta@redhat.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=chrisw@sous-sol.org \
    --cc=ehabkost@redhat.com \
    --cc=glommer@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=zach@vmware.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 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.