virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>,
	Virtualization Mailing List <virtualization@lists.osdl.org>
Subject: Re: proposed interface change for setting the ldt
Date: Fri, 18 Aug 2006 20:12:56 -0700	[thread overview]
Message-ID: <44E681B8.3020804@vmware.com> (raw)
In-Reply-To: <44E679ED.6010300@goop.org>

Jeremy Fitzhardinge wrote:
> Zachary Amsden wrote:
>> This interface doesn't work for anything other than Xen.
>
> It works OK for native.  It's a very simple rolling together of two 
> operations which always happen together anyway.
>
>> It is impossible to implement it without specific knowledge of kernel 
>> internals, since it doesn't provide the GDT selector for the LDT.
>
> Neither does the previous interface.  load_ldt_desc needs to have the 
> specific LDT entry hardcoded into it.
>
>>   Now everything that looks like real hardware needs to move the 
>> knowledge of the LDT structure into paravirt-ops, 
>
> Do you mean the GDT structure?

Yes.

>
>> and it has no clear calling convention, so you've now got to reason 
>> about SMP preemption correctness inside the paravirt-op, instead of 
>> at the higher level where it should be done.
>
> The previous interface already required that preempt be disabled 
> around those functions.  In the previous interface, set_ldt_desc takes 
> a cpu number, but it is required to equal the current cpu; 
> load_ldt_desc always operates on the current CPU.  It therefore 
> requires that those two ops be paired with preempt disabled.  The new 
> interface is simpler, but still requires preempt disabled around it.

The paravirt-op just got a lot harder to implement, so there is a cost 
to the simpler interface.

>
> In general, the set_ldt interface is cleaner for the base kernel, and 
> much cleaner for Xen, while being trivial to implement for native 
> hardware or something which looks like it.

I just think it's really weird to have LDT not described in the GDT, but 
LDT is weird anyways.

Zach

  reply	other threads:[~2006-08-19  3:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 10:42 proposed interface change for setting the ldt Jeremy Fitzhardinge
2006-08-18 12:46 ` 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 [this message]
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=44E681B8.3020804@vmware.com \
    --to=zach@vmware.com \
    --cc=chrisw@sous-sol.org \
    --cc=jeremy@goop.org \
    --cc=virtualization@lists.osdl.org \
    /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).