All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ky Srinivasan" <ksrinivasan@novell.com>
To: xen-devel@lists.xensource.com, Ky Srinivasan <KSrinivasan@novell.com>
Subject: Re: context switch
Date: Tue, 28 Mar 2006 12:33:55 -0500	[thread overview]
Message-ID: <44292D32.E57C.0030.0@novell.com> (raw)
In-Reply-To: <44291E76.E57C.0030.0@novell.com>

 Looking more at the generic Linux CS code, saving the selector values
of the outgoing context and setting the segment registers values to zero
in prepare_arch_switch() we think deals with the problem I have listed
below (thanks to Jan for pointing this out). While this expensive trick
may solve this problem, a simpler solution perhaps might be to have an
efficient  mechanism for the guest to manage hypervisor preemptions. We
could build this mechanism in a way  that does not compromise the
ability of the hypervisor to deal with buggy guests while still
supporting efficient implementation of guests. This preemption
management framework also would be useful in dealing with bad preemption
problems in SMP guests. Would there be an interest in implementing this
preemption management framework.

Regards,
 
K. Y

>>> "Ky Srinivasan" <ksrinivasan@novell.com> 03/28/06 11:31 am >>> 
In debugging the sles9 port on 64 bit MP machines, I am seeing a
problem
where the hypervisor takes a fault in loading fs in the context switch
code (load_segments()). The selector is one of the TLS selectors. It
appears that the cpu in question has updated this selector with a
value
of 0 just prior to the problem I am seeing. Looking at the Linux
context
switch code, we first update the TLS selector values of the incoming
context  before we load the segment registers. So, if we preempt the
CPU
after it has modified the gdt table but before it loads up the segment
registers, we could get into a situation where when the hypervisor
resumes the preempted domain on this cpu, we could fault on the
segment
register load. I am  curious to understand why this is not an issue.
How
are such windows closed. 

Regards,

K. Y



_______________________________________________
Xen- devel mailing list
Xen- devel@lists.xensource.com
http://lists.xensource.com/xen- devel

  reply	other threads:[~2006-03-28 17:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <44284B8E.E57C.0030.0@novell.com>
2006-03-28 16:31 ` context switch Ky Srinivasan
2006-03-28 17:33   ` Ky Srinivasan [this message]
2006-03-28 17:40     ` Keir Fraser
2006-03-28 19:35       ` Keir Fraser
2006-03-28 20:56         ` Keir Fraser
2006-03-29  0:49           ` Ky Srinivasan
2006-03-29  9:06             ` Keir Fraser
2006-03-29  0:44       ` Ky Srinivasan

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=44292D32.E57C.0030.0@novell.com \
    --to=ksrinivasan@novell.com \
    --cc=xen-devel@lists.xensource.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 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.