|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [RFC PATCH 06/33] Add Xen interface header files
To: |
linux-kernel <linux-kernel@xxxxxxxxxxxxxxx> |
Subject: |
[Xen-devel] Re: [RFC PATCH 06/33] Add Xen interface header files |
From: |
Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> |
Date: |
Tue, 18 Jul 2006 14:39:33 -0400 |
Cc: |
Andrew Morton <akpm@xxxxxxxx>, Zachary Amsden <zach@xxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization <virtualization@xxxxxxxxxxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> |
Delivery-date: |
Thu, 20 Jul 2006 05:22:09 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
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 |
In-Reply-To: <20060718091950.075712000@xxxxxxxxxxxx>
On Tue, 18 Jul 2006 00:00:06 -0700, Chris Wright wrote:
>
> Add Xen interface header files.
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/include/xen/interface/arch-x86_32.h Thu Jun 08 19:24:13 2006 -0400
> +#define FIRST_RESERVED_GDT_PAGE 14
> +#define FIRST_RESERVED_GDT_BYTE (FIRST_RESERVED_GDT_PAGE * 4096)
> +#define FIRST_RESERVED_GDT_ENTRY (FIRST_RESERVED_GDT_BYTE / 8)
== 7168
> +
> +/*
> + * These flat segments are in the Xen-private section of every GDT. Since
> these
> + * are also present in the initial GDT, many OSes will be able to avoid
> + * installing their own GDT.
> + */
> +#define FLAT_RING1_CS 0xe019 /* GDT index 259 */
> +#define FLAT_RING1_DS 0xe021 /* GDT index 260 */
> +#define FLAT_RING1_SS 0xe021 /* GDT index 260 */
> +#define FLAT_RING3_CS 0xe02b /* GDT index 261 */
> +#define FLAT_RING3_DS 0xe033 /* GDT index 262 */
> +#define FLAT_RING3_SS 0xe033 /* GDT index 262 */
Umm, these definitions are magic hardcoded constants that really refer
to indexes 7171 through 7174.
How about this instead?
+#define FLAT_RING1_CS (((FIRST_RESERVED_GDT_ENTRY + 3) << 3) | 1)
+#define FLAT_RING1_DS (((FIRST_RESERVED_GDT_ENTRY + 4) << 3) | 1)
+#define FLAT_RING1_SS FLAT_RING1_DS
+#define FLAT_RING3_CS (((FIRST_RESERVED_GDT_ENTRY + 5) << 3) | 3)
+#define FLAT_RING3_DS (((FIRST_RESERVED_GDT_ENTRY + 6) << 3) | 3)
+#define FLAT_RING3_SS FLAT_RING3_DS
--
Chuck
And did we tell you the name of the game, boy, we call it Riding the Gravy
Train.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] Re: [RFC PATCH 06/33] Add Xen interface header files,
Chuck Ebbert <=
|
|
|
|
|