From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ky Srinivasan" Subject: context switch Date: Tue, 28 Mar 2006 11:31:03 -0500 Message-ID: <44291E76.E57C.0030.0@novell.com> References: <44284B8E.E57C.0030.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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