Thread (35 messages) 35 messages, 8 authors, 2008-10-20

Re: [RFC v6][PATCH 3/9] x86 support for checkpoint/restart

From: Cedric Le Goater <hidden>
Date: 2008-10-10 10:22:29
Also in: lkml

+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)


thanks,

C.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help