Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759426AbYFYEmy (ORCPT ); Wed, 25 Jun 2008 00:42:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755709AbYFYEh0 (ORCPT ); Wed, 25 Jun 2008 00:37:26 -0400 Received: from 9.sub-70-198-159.myvzw.com ([70.198.159.9]:37455 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754656AbYFYEhR (ORCPT ); Wed, 25 Jun 2008 00:37:17 -0400 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 27 of 36] x86_64: __switch_to(): Move arch_leave_lazy_cpu_mode() to the right place X-Mercurial-Node: 2281dbcc167afedbee492af58721110a123c90f6 Message-Id: <2281dbcc167afedbee49.1214367563@localhost> In-Reply-To: Date: Wed, 25 Jun 2008 00:19:23 -0400 From: Jeremy Fitzhardinge To: Ingo Molnar Cc: LKML , x86@kernel.org, xen-devel , Stephen Tweedie , Eduardo Habkost , Mark McLoughlin , x86@kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1129 Lines: 37 We must leave lazy mode before switching the %fs and %gs selectors. (patch should be merged with previous __switch_to()/arch_leave_lazy_cpu_mode() patch) Signed-off-by: Eduardo Habkost Signed-off-by: Jeremy Fitzhardinge --- arch/x86/kernel/process_64.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -603,6 +603,15 @@ load_TLS(next, cpu); + /* + * Leave lazy mode, flushing any hypercalls made here. + * This must be done before restoring TLS segments so + * the GDT and LDT are properly updated, and must be + * done before math_state_restore, so the TS bit is up + * to date. + */ + arch_leave_lazy_cpu_mode(); + /* * Switch FS and GS. */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/