Fix CPU chaining in linux-user emulation, by Gwenole Beauchesne.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2459 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f3f97b0..76b3652 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1720,8 +1720,7 @@
         ts->next = first_task_state;
         first_task_state = ts;
         /* we create a new CPU instance. */
-        new_env = cpu_init();
-        memcpy(new_env, env, sizeof(CPUState));
+        new_env = cpu_copy(env);
 #if defined(TARGET_I386)
         if (!newsp)
             newsp = env->regs[R_ESP];