$EXTINDEX_DIR/description missing
 help / color / mirror / Atom feed
From: Christian Limpach <chris@pin.lu>
To: Kip Macy <kmacy@fsmware.com>, xen-devel@lists.sourceforge.net
Subject: Re: do_set_gdt
Date: Sat, 28 Feb 2004 15:39:19 +0100	[thread overview]
Message-ID: <184a01c3fe08$a92d0800$070414ac@pin> (raw)
In-Reply-To: 20040226205052.Q13979@demos.bsdclusters.com

> Given that you that the first 256 GDT entries aren't reserved and you
> explicitly state why, shouldn't the following check:
>
>     if ( (entries <= LAST_RESERVED_GDT_ENTRY) || (entries > 8192) )
>         return -EINVAL;

I think this is so that Xen can copy its GDT entries into the table which
you pass to it.  If you look in set_gdt() you'll see that Xen copies its
entries into the new GDT table.  This implies that all entries upto
FIRST_RESERVED_GDT_ENTRY have to be valid since at least
LAST_RESERVED_GDT_ENTRY many entries will have to be activated.  If you
wanted to allow a guest to request less than LAST_RESERVED_GDT_ENTRY
entries, Xen would have to (at least) copy the entries to a private GDT
table and use that.  This would still use at least 1 page so it's preferable
to just make the guest provide enough space to fit LAST_RESERVED_GDT_ENTRY
many entries and avoid a special case.

You'll also want to make sure that you don't put other stuff in the last
page which hold the GDT table and align the GDT table to a page boundary:
lgdt allows the gdt to be anywhere while for Xen you have to put it at the
beginning of a page, can't really use the rest of the last page for much
else and have to keep the pages around.

    christian



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

  reply	other threads:[~2004-02-28 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-28  5:20 do_set_gdt Kip Macy
2004-02-28 14:39 ` Christian Limpach [this message]
2004-02-28 14:44   ` do_set_gdt Keir Fraser
2004-02-28 19:09     ` do_set_gdt Kip Macy
2004-02-28 21:10       ` do_set_gdt Christian Limpach
2004-02-28 22:05         ` do_set_gdt Kip Macy
2004-02-29  0:41           ` do_set_gdt Christian Limpach
2004-02-29  9:31           ` do_set_gdt Keir Fraser
2004-03-01  3:57             ` do_set_gdt Kip Macy
2004-02-29  9:22       ` do_set_gdt Keir Fraser

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='184a01c3fe08$a92d0800$070414ac@pin' \
    --to=chris@pin.lu \
    --cc=kmacy@fsmware.com \
    --cc=xen-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.