mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>,
	Chris Wright <chrisw@sous-sol.org>,
	virtualization <virtualization@lists.osdl.org>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Jeremy Fitzhardinge <jeremy@goop.org>, Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@osdl.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Zachary Amsden <zach@vmware.com>,
	Ian Pratt <Ian.Pratt@xensource.com>
Subject: Re: [RFC PATCH 06/33] Add Xen interface header files
Date: Tue, 18 Jul 2006 14:39:33 -0400	[thread overview]
Message-ID: <200607181441_MC3-1-C556-4414@compuserve.com> (raw)

In-Reply-To: <20060718091950.075712000@sous-sol.org>

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.

             reply	other threads:[~2006-07-18 18:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18 18:39 Chuck Ebbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-18  9:18 [RFC PATCH 00/33] Xen i386 paravirtualization support Chris Wright
2006-07-18  7:00 ` [RFC PATCH 06/33] Add Xen interface header files Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607181441_MC3-1-C556-4414@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=Christian.Limpach@cl.cam.ac.uk \
    --cc=Ian.Pratt@xensource.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=chrisw@sous-sol.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.osdl.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=zach@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®