Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757126AbYJJKaF (ORCPT ); Fri, 10 Oct 2008 06:30:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752857AbYJJK3y (ORCPT ); Fri, 10 Oct 2008 06:29:54 -0400 Received: from jalapeno.cc.columbia.edu ([128.59.29.5]:64404 "EHLO jalapeno.cc.columbia.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788AbYJJK3y (ORCPT ); Fri, 10 Oct 2008 06:29:54 -0400 Message-ID: <48EF2D5F.5010701@cs.columbia.edu> Date: Fri, 10 Oct 2008 06:24:31 -0400 From: Oren Laadan Organization: Columbia University User-Agent: Thunderbird 2.0.0.16 (X11/20080707) MIME-Version: 1.0 To: Cedric Le Goater CC: jeremy@goop.org, arnd@arndb.de, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Dave Hansen , linux-mm@kvack.org, Alexander Viro , "H. Peter Anvin" , Ingo Molnar Subject: Re: [RFC v6][PATCH 3/9] x86 support for checkpoint/restart References: <1223461197-11513-1-git-send-email-orenl@cs.columbia.edu> <1223461197-11513-4-git-send-email-orenl@cs.columbia.edu> <48EF2CB3.9040900@fr.ibm.com> In-Reply-To: <48EF2CB3.9040900@fr.ibm.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-No-Spam-Score: Local Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1040 Lines: 44 Cedric Le Goater wrote: >> +int cr_read_cpu_fpu(struct cr_hdr_cpu *hh, struct task_struct *t) >> +{ >> + struct thread_struct *thread = &t->thread; >> + >> + /* i387 + MMU + SSE */ >> + >> + preempt_disable(); >> + >> + __clear_fpu(t); /* in case we used FPU in user mode */ >> + >> + if (!hh->used_math) >> + clear_used_math(); >> + else { >> + if (hh->has_fxsr != cpu_has_fxsr) { >> + force_sig(SIGFPE, t); >> + return -EINVAL; >> + } > > don't you need an init_fpu() around here ? because the task you restart might > not have used FPU yet. > >> + memcpy(&thread->xstate, &hh->xstate, sizeof(thread->xstate)); > > also i'd used 'xstate_size' instead of sizeof(thread->xstate) > Yes, that was broken, and already fixed in for next round. Thanks, Oren. > > thanks, > > C. -- 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/