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

[Xen-devel] segmentation and Xen

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] segmentation and Xen
From: "Jonathan M. McCune" <jonmccune@xxxxxxx>
Date: Fri, 14 Oct 2005 13:00:48 -0400
Cc: Arvind Seshadri <arvinds@xxxxxxxxxx>, Bryan Parno <parno@xxxxxxx>
Delivery-date: Fri, 14 Oct 2005 17:00:02 +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
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)
Hello,

We noticed a difference in the kernel and user space code and data segment descriptor entries in the GDTs for Xen and XenoLinux. It does not appear that the Xen GDT totally supplants the Linux GDT, as the Linux GDT has its limit changed (in the descriptor, but not the comments) appropriately to make room for Xen in the upper 64 MB. The difference is in the "Accessed" bit of the "Type" field, as defined in Chapter 4, Volume 3, of the Intel manuals. Can you help us to understand why the Access bit is set in the Linux kernel code but not in the Xen code?

More generally, how do the GDTs defined in head.S and x86_32.S interact? It seems problematic that Xen defines a GDT for guest OSes, but guest OSes are allowed to retain a GDT of their own.

Thanks,
-Jon


linux-2.6.12-xenU/arch/xen/i386/kernel/head.S

#ifdef CONFIG_X86_PAE
       .quad 0x00cfbb00000067ff        /* 0x60 kernel 4GB code at 0x00000000 */
       .quad 0x00cfb300000067ff        /* 0x68 kernel 4GB data at 0x00000000 */
       .quad 0x00cffb00000067ff        /* 0x73 user 4GB code at 0x00000000 */
       .quad 0x00cff300000067ff        /* 0x7b user 4GB data at 0x00000000 */
#else
       .quad 0x00cfbb000000c3ff        /* 0x60 kernel 4GB code at 0x00000000 */
       .quad 0x00cfb3000000c3ff        /* 0x68 kernel 4GB data at 0x00000000 */
       .quad 0x00cffb000000c3ff        /* 0x73 user 4GB code at 0x00000000 */
       .quad 0x00cff3000000c3ff        /* 0x7b user 4GB data at 0x00000000 */
#endif

xen/arch/x86/boot/x86_32.S

#ifdef CONFIG_X86_PAE
       .quad 0x00cfba00000067ff
       .quad 0x00cfb200000067ff
       .quad 0x00cffa00000067ff
       .quad 0x00cff200000067ff
#else
       .quad 0x00cfba000000c3ff     /* 0xe019 ring 1 3.95GB code at 0x0 */
       .quad 0x00cfb2000000c3ff     /* 0xe021 ring 1 3.95GB data at 0x0 */
       .quad 0x00cffa000000c3ff     /* 0xe02b ring 3 3.95GB code at 0x0 */
       .quad 0x00cff2000000c3ff     /* 0xe033 ring 3 3.95GB data at 0x0 */
#endif

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>