From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Zachary Amsden <zach@vmware.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Chris Wright <chrisw@sous-sol.org>
Cc: Virtualization Mailing List <virtualization@lists.osdl.org>
Subject: proposed interface change for setting the ldt
Date: Fri, 18 Aug 2006 11:42:43 +0100 [thread overview]
Message-ID: <44E599A3.6020907@goop.org> (raw)
At the moment, all the places where the LDT are set in the kernel are of
the form:
set_ldt_desc(cpu, segments, count);
load_LDT_desc();
(two instances in asm-i386/desc.h). set_ldt_desc() sets an LDT
descriptor in the GDT, and load_LDT_desc() is basically just lldt. These
map to the write_gdt_entry and load_ldt_desc paravirt ops.
This doesn't work well for Xen, because you set the ldt directly by
passing the base+size into the hypervisor. In fact, it doesn't allow
you to set an LDT-type descriptor into the GDT, so this current
interface requires the Xen backend to decode the descriptor passed to
write_gdt_entry, look to see if its an LDT; if so, store the base+size
somewhere, and then when load_ldt_desc() is called, do the appropriate
Xen hypercall.
A better interface for us would be simply:
set_ldt(const struct desc_struct *ldt, int num_entries);
since this maps directly to the appropriate Xen hypercall. If you still
want to implement it by plugging the LDT descriptor into the GDT and
then lldt, then there's no reason you can't implement it that way.
Thoughts?
J
next reply other threads:[~2006-08-18 10:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 10:42 Jeremy Fitzhardinge [this message]
2006-08-18 12:46 ` proposed interface change for setting the ldt Jeremy Fitzhardinge
2006-08-18 13:03 ` Jeremy Fitzhardinge
2006-08-18 20:23 ` Zachary Amsden
2006-08-19 2:39 ` Jeremy Fitzhardinge
2006-08-19 3:12 ` Zachary Amsden
2006-08-19 3:18 ` Jeremy Fitzhardinge
2006-08-19 3:22 ` Chris Wright
2006-08-19 3:41 ` Zachary Amsden
2006-08-19 4:32 ` Rusty Russell
2006-08-19 12:18 ` Jeremy Fitzhardinge
2006-08-21 5:01 ` Zachary Amsden
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=44E599A3.6020907@goop.org \
--to=jeremy@goop.org \
--cc=chrisw@sous-sol.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.osdl.org \
--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;
as well as URLs for NNTP newsgroup(s).