[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] Re: Xen and TLS, -mno-tls-direct-seg-refs needed?



 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Molle Bestefich
> Sent: 12 August 2006 11:39
> To: Sven Köhler
> Cc: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] Re: Xen and TLS, -mno-tls-direct-seg-refs needed?
> 
> Sven Köhler wrote:
> > Yes, but what you describe is kernel-internal. But the
> > "-mno-tls-direct-seg-refs" is glibc-specific and changes 
> glibc-internal
> > things, not kernel-internal things.
> 
> Yes, but what I was implying (but not writing - sorry), was that since
> the 4 GB address space is virtual, and Xen does not live within it,
> there's no need for Xen to fiddle with segments for protection
> purposes, and thus it probably doesn't.  And so there wouldn't be a
> performance penalty.
> 
> > But who knows? :-)
> 
> Not me, I just keep ranting :-).
> 
> I hope Mats can answer it when he comes around; he seems to have quite
> a lot of knowledge on all things CPU and I've seen him help out people
> in xen-users quite a lot.

Seeing as I was mentioned directly, I suppose I have to try to reply to this. 

What is being said above seems to make sense to me (I actually don't REALLY 
know how the TLS stuff works, other than what I've read here, which says that 
it uses negative segment offsets, which makes funny things happen if you use 
limits other than 4GB on the segment!). 

In fact, the segment limits aren't being used in the 64-bit port at all - it 
uses some tricky page-table stuff instead. This is because when we initially 
made the 64-bit mode for Opteron/Athlon64 processors, we didn't foresee anyone 
using segments for protection any longer - most 32-bit code doesn't, the 
exception being some of the VMMs... So it was said that the limit of a segment 
is "unused". 

However, there is a fix in the later models of Opteron/Athlon64 processors that 
allows segments to be used. Intel, I think, hasn't got this feature (yet?)... 

So for backwards compatibility reasons and such, the 64-bit version of Xen uses 
a different method for protecting itself from being overwritten, and therfore 
negative segment references work fine. 

--
Mats
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 
> 
> 



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.