WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] %fs/%gs cleanup in mmu_context.h

To: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] %fs/%gs cleanup in mmu_context.h
From: Chris Wright <chrisw@xxxxxxxx>
Date: Fri, 12 Aug 2005 16:55:08 -0700
Cc: Chris Wright <chrisw@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 12 Aug 2005 23:53:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050812232324.GB19354@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20050812230549.GI7901@xxxxxxxxxxxxxxxxxxx> <20050812232324.GB19354@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
* Vincent Hanquez (vincent.hanquez@xxxxxxxxxxxx) wrote:
> On Fri, Aug 12, 2005 at 04:05:49PM -0700, Chris Wright wrote:
> > 
> > diff -r ba46bd7f5cdf 
> > linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h
> > --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h   Fri Aug 
> > 12 15:59:34 2005
> > +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h   Fri Aug 
> > 12 15:59:38 2005
> > @@ -34,10 +34,10 @@
> >      * are always kernel segments while inside the kernel. Must
> >      * happen before reload of cr3/ldt (i.e., not in __switch_to).
> >      */
> > -   __asm__ __volatile__ ( "mov %%fs,%0 ; mov %%gs,%1"
> > -           : "=m" (*(int *)&current->thread.fs),
> > -             "=m" (*(int *)&current->thread.gs));
> > -   __asm__ __volatile__ ( "mov %0,%%fs ; mov %0,%%gs"
> > +   asm volatile ( "movl %%fs,%0 ; movl %%gs,%1"
> > +           : "=m" (current->thread.fs),
> > +             "=m" (current->thread.gs));
> > +   asm volatile ( "movl %0,%%fs ; movl %0,%%gs"
> >             : : "r" (0) );
> >  }
> >  
> 
> The first inline asm is wrong.
> latest binutils no longer accept instructions for moving between a
> segment register and a 32bit memory location. you should keep the "mov"
> instead of "movl".

Thanks Vincent (I had forgotten about that thread, ISTR Linus agruing
vehemently against the change).  Heh, the irony, objdump is showing
the assembler generating movl in both cases.  I have no preference,
I'll resubmit.

thanks,
-chris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>