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

To: Kip Macy <kmacy@xxxxxxxxxxx>
Subject: Re: [Xen-devel] do_set_gdt
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sun, 29 Feb 2004 09:22:19 +0000
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, Christian Limpach <chris@xxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 29 Feb 2004 09:24:01 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Sat, 28 Feb 2004 11:09:50 PST." <20040228110550.C6526@xxxxxxxxxxxxxxxxxxxxx>
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
> > > You'll also want to make sure that you don't put other stuff in the last
> > > page which hold the GDT table and align the GDT table to a page boundary:
> > > lgdt allows the gdt to be anywhere while for Xen you have to put it at the
> > > beginning of a page, can't really use the rest of the last page for much
> > > else and have to keep the pages around.
> >
> > Yes, this is all correct. On first glance I thought this was a bug (I
> > thought the code was deciding whether a particular GDT entry could be
> > updated by the guest).
> >
> 
> 
> Yes, but you have to pass in at least a page which == 512 entries. So if
> I'm only using the first 8 entries, there is no reason Xen can't use
> 256-296. Passing in LAST_RESERVED_ENTRY + 1, seems a little contrived
> when it is only the first 8 that I care about. A better approach would
> be to insist that entries 256-296 are set to 0 in the case where the
> user sets nentries >= FIRST_RESERVED_ENTRY.

Part of the semantics of GDT virtualisation is that the guest knows
which entries will be taken by Xen, and must offer a large enough
table to contain Xen's entries. 

Given that you pretty much have to burn a page on the GDT (since we
use page-level protection to prevent direct guest updates of the GDT),
zeroing out a whole page and passing in ents==512 doesn't seem a great
hardship. 

One of the reasons for not going down the full virtualisation route is
that it allows us to adjust the VM interface for Xen's benefit -- some
of these changes may seem odd or contrived if you're not aware how Xen
benefits. But I'm fairly happy that none of the changes should be too
onerous for the guest-OS programmer to abide by.

 -- Keir


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&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>