lkml.org 
[lkml]   [2008]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v6][PATCH 3/9] x86 support for checkpoint/restart


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.


\
 
 \ /
  Last update: 2008-10-10 12:33    [W:1.305 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site