From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH 11/16] turn priviled operation into a macro in head_64.S Date: Wed, 31 Oct 2007 21:50:50 -0700 Message-ID: <47295B2A.3080200@goop.org> References: <1193858101367-git-send-email-gcosta@redhat.com> <11938581073775-git-send-email-gcosta@redhat.com> <11938581133479-git-send-email-gcosta@redhat.com> <1193858118284-git-send-email-gcosta@redhat.com> <11938581242810-git-send-email-gcosta@redhat.com> <1193858130443-git-send-email-gcosta@redhat.com> <11938581351064-git-send-email-gcosta@redhat.com> <11938581403478-git-send-email-gcosta@redhat.com> <11938581451804-git-send-email-gcosta@redhat.com> <11938581512730-git-send-email-gcosta@redhat.com> <11938581562552-git-send-email-gcosta@redhat.com> <11938581612389-git-send-email-gcosta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: zach-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org, lguest-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org, ak-l3A5Bk7waGM@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Glauber de Oliveira Costa Return-path: In-Reply-To: <11938581612389-git-send-email-gcosta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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 > Signed-off-by: Steven Rostedt > Acked-by: Jeremy Fitzhardinge > --- > 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 > #include > > +#ifdef CONFIG_PARAVIRT > +#include > +#include > +#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) > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/