mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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
This commit is contained in:
parent
130751ee24
commit
c5be9f0898
3 changed files with 15 additions and 2 deletions
12
exec.c
12
exec.c
|
@ -1222,6 +1222,18 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
|
|||
abort();
|
||||
}
|
||||
|
||||
CPUState *cpu_copy(CPUState *env)
|
||||
{
|
||||
CPUState *new_env = cpu_init();
|
||||
/* preserve chaining and index */
|
||||
CPUState *next_cpu = new_env->next_cpu;
|
||||
int cpu_index = new_env->cpu_index;
|
||||
memcpy(new_env, env, sizeof(CPUState));
|
||||
new_env->next_cpu = next_cpu;
|
||||
new_env->cpu_index = cpu_index;
|
||||
return new_env;
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
|
||||
/* NOTE: if flush_global is true, also flush global entries (not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue