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:31:55 +0000
Cc: Christian Limpach <chris@xxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 29 Feb 2004 09:33:17 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Sat, 28 Feb 2004 14:05:10 PST." <20040228134211.A63125@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
> HYPERVISOR_set_gdt(unsigned long *frame_list, unsigned int entries)
> 
> frame_list: an array of up to 16 page frames on which the gdt resides
> 
> entries: NOT the number of entries used in the gdt, but rather the
> number of gdt sized elements on the page that the hypervisor can use,
> this number must be greater than the maximum number of reserved entries
> regardless of the actual number of gdt entries you use or the call will
> fail with EINVAL, do not use FIRST_RESERVED_GDT_ENTRY -
> LAST_RESERVED_GDT_ENTRY as they are blindly overwritten by the
> hypervisor. You are, however, free to use any entry prior to
> FIRST_RESERVED_GDT_ENTRY and after LAST_RESERVED_GDT_ENTRY.

frame_list: An array of up to 16 page frames within which the GDT
resides. Any frame registered as a GDT frame may only be mapped
read-only within the guest's address space (e.g., no writeable
mappings, no use as a page-table page, and so on).

entries: The number of descriptor-entry slots in the GDT. Note that
the table must be large enough to contain Xen's reserved entries; thus
we must have 'entries > LAST_RESERVED_GDT_ENTRY'. Note also that,
after registering the GDT, slots FIRST_RESERVED_GDT_ENTRY to
LAST_RESERVED_GDT_ENTRY are no longer usable by the guest and may be
overwritten by Xen. 

> =========================================================================
> 
> 
> I think segments are intrinsically crufty, so a crufty interface is
> unavoidable. I'm merely pointing out that this particular interface
> requires the guest to know more about the internals of Xen than
> standard system/hyper call. To claim otherwise would be misleading.

It's the same with the linear address space: the guest is aware that
the top 64MB of the address space is unavailable to it. Similarly
here, the guest will be aware that a number of GDT entries are
inaccessible outside Xen.

This inelegance is part of the price we pay for performance on x86.

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