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] xen and tls (fwd)

To: "'Ronald G. Minnich'" <rminnich@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] xen and tls (fwd)
From: "Michael A Fetterman" <Michael.Fetterman@xxxxxxxxxxxx>
Date: Mon, 14 Feb 2005 17:02:59 -0000
Delivery-date: Mon, 14 Feb 2005 17:05:08 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
In-reply-to: <Pine.LNX.4.58.0502140853150.10141@xxxxxxxxxxxxxxx>
Keywords: Archived
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcUSregWgL95JhkbSVG19fQ+2zrBZQABZ3LA
Normally, under linux, we run with segment limits of 4G.
That is, essentially no limit, any segment offset from 0 to 4G (unsigned)
is OK.  Equivalently, any segment offset from -2G to 2G (signed) is OK.

Xen, however, uses segmentation to protect itself from guest OSes...
Xen runs in ring 0.
Guest OSes run in ring 1.
Guest user apps run in ring 3.

Paging provides a supervisor/user permission check, but there's only one
bit, and it says that rings 0-2 are all "supervisor" rings, and only ring
3 is prohibited from seeing those pages.  So paging doesn't provide Xen
with any protection from guest OSes.  Enter segmentation.

Xen sets up the segment registers so that the top 64MB of memory is
beyond the segment limit whenever the guest OS is running.

However, this creates a hole in memory (especially when the segment base
is non-zero).  Segments are base and limit kinds of things; they don't
support "holes".  Segments *do* however do a trick called "grow down",
which essentially means that you can invert the sense of the in-bounds/
out-of-bounds test for segment limits.  That allows you to have segments
that are valid from segbase upwards, and segments that are valid from
just below segbase and "downward" to the limit from there.  So Xen attempts
to detect accesses to the "other" side of segbase that should have been
valid, but aren't, due to not being able to express "holes" in the
segmentation model, and it flips the sense of the segment register to allow
such accesses to proceed.

The faulting and restarting associated with this are, however, relatively
expensive.  The tls libraries (as currently written) exhibit approximately
worst case behavior, alternating positive and negative accesses via segment
registers with non-zero segbases.  It's faster to just not use /lib/tls...


-----Original Message-----
From: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
[mailto:xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Ronald G.
Minnich
Sent: Monday, February 14, 2005 3:54 PM
To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] xen and tls (fwd)


I forget the reason, can somebody fill me in?

thanks

ron

---------- Forwarded message ----------
Date: Mon, 14 Feb 2005 10:50:56 -0500
To: rminnich@xxxxxxxx
Subject: xen and tls

do you know why, when i booted xen, i was told to
mv /lib/tls /lib/tls.disabled
otherwise it would be very slow and may cause instability
(i.e. programmes would fault)?


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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