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] Domain0/Domain 1 and ring1 (x86) - tracing question

To: "John Que" <qwejohn@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] Domain0/Domain 1 and ring1 (x86) - tracing question
From: "Petersson, Mats" <mats.petersson@xxxxxxx>
Date: Tue, 16 Aug 2005 13:14:30 +0200
Delivery-date: Tue, 16 Aug 2005 11:20:58 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWiUMpJLtIyURyPSFmqUk1jq2SnFAAAp5YQ
Thread-topic: [Xen-devel] Domain0/Domain 1 and ring1 (x86) - tracing question
There's a #define in arch-x86_32.h that defines FLAT_KERNEL_[CDS]S to
FLAT_RING1_[CDS]S. FLAT_RING1_[CDS]S is the entry in GDT for a CPL=1
(ring 1) code/data/stack[1] segment selector. 
It is then used in various places to set up the registers used by the
actual kernel, for example the file
linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h is using the
KERNEL_CS to give the BOOT_CS to the Linux kernel. 

[1] Stack segment is actually using the same selector as the data
segment. 

--
Mats

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of John Que
> Sent: 16 August 2005 11:59
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-devel] Domain0/Domain 1 and ring1 (x86) - 
> tracing question
> 
> Hello,
> As I understand the Hypervisor should run in Ring 0 of the 
> x86 , and the domains (Domain0 and DomainU) should work in Ring 1. 
> 
> I was a bit curious where in the code this assiging of Ring 0 
> to Xen and Ring 1 to dom0/domU is done ?
> I had tried to look under arch/xen/i386 and didn't find.
> 
> Is it in the assembler *.S files ?
> 
> Regards,
> John
> 
> _______________________________________________
> 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