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] question about xen virtual base address

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] question about xen virtual base address
From: "Agarwal, Lomesh" <lomesh.agarwal@xxxxxxxxx>
Date: Mon, 10 Mar 2008 14:44:07 -0700
Delivery-date: Mon, 10 Mar 2008 14:48:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3F9B337.1DB89%keir.fraser@xxxxxxxxxxxxx>
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: <3C8AFFB665DD57429CD08AA498ACBDA9B12FA7@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C3F9B337.1DB89%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciBcSJYH774l4FPSG+NLhaEkXN2zwAiXMnCAD9C5cA=
Thread-topic: [Xen-devel] question about xen virtual base address
I don't understand how are GDT table entries for Xen created? Init. Code
subtracts 14 pages from gdt_table address for GDT table address. Who
populates entries at that address?

-----Original Message-----
From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx] 
Sent: Sunday, March 09, 2008 8:31 AM
To: Agarwal, Lomesh; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] question about xen virtual base address

Answer to both questions is that we want to keep out of the way of
paravirtual guest OS addressing. Guests want to use virtual addresses
from
0x0, so Xen has to be raised up out of the way. Similarly, guests may
expect
to use GDT entries starting from entry 0 upwards, and hence Xen gets
pushed
up to the last two pages of a full-size GDT. Both of these shifts are
required because Xen shares its own virtual-memory structures (GDT, page
tables) with the guest, for efficient switching between guest context
and
hypervisor context.

 -- Keir

On 8/3/08 23:07, "Agarwal, Lomesh" <lomesh.agarwal@xxxxxxxxx> wrote:

> I have two questions regarding x86_64 xen boot code -
> 1. It looks like Xen base virtual address is 0xFFFF830000000000.
That's
> why Page table needs to have mirror mapping for lower and higher
virtual
> address. If the base virtual address would have been 0
(__PAGE_OFFSET),
> code in file x86_64.S would have been much easy to understand and
> maintain. So, is there a specific reason to choose this high virtual
> address?
> 2. Why do we need to subtract FIRST_RESERVED_GDT_BYTE (14 pages) from
> address of gdt_table when calculating the base address for GDT table?
> How does this subtraction give the right address for GDT table?
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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

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