[7242] qemu: introduce qemu_init_vcpu (Marcelo Tosatti)
Revision: 7242
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7242 Author: aliguori Date: 2009-04-24 18:03:41 +0000 (Fri, 24 Apr 2009)
Log Message:
-----------
qemu: introduce qemu_init_vcpu (Marcelo Tosatti)
Modified Paths:
--------------
trunk/qemu-common.h
trunk/target-alpha/translate.c
trunk/target-arm/helper.c
trunk/target-cris/translate.c
trunk/target-i386/helper.c
trunk/target-m68k/helper.c
trunk/target-mips/translate.c
trunk/target-ppc/helper.c
trunk/target-sh4/translate.c
trunk/target-sparc/helper.c
trunk/vl.cModified: trunk/qemu-common.h
===================================================================
qemu-common.h +6 -0
@@ -189,6 +189,12 @@/* Force QEMU to process pending events */ void qemu_notify_event (void ); +#ifdef CONFIG_USER_ONLY +#define qemu_init_vcpu (env) do { } while (0) +#else +void qemu_init_vcpu (void *env); +#endif + typedef struct QEMUIOVector { struct iovec *iov; int niov;
Modified: trunk/target-alpha/translate.c
===================================================================
target-alpha/translate.c +1 -0
@@ -2505,6 +2505,7 @@ env->ipr[IPR_SISR ] =0 ; env->ipr[IPR_VIRBND ] =-1ULL ; +qemu_init_vcpu (env);return env; }
Modified: trunk/target-arm/helper.c
===================================================================
target-arm/helper.c +1 -0
@@ -267,6 +267,7 @@gdb_register_coprocessor (env, vfp_gdb_get_reg, vfp_gdb_set_reg,19 ,"arm-vfp.xml" ,0 ); } +qemu_init_vcpu (env);return env; }
Modified: trunk/target-cris/translate.c
===================================================================
target-cris/translate.c +1 -0
@@ -3405,6 +3405,7 @@cpu_exec_init (env);cpu_reset (env); +qemu_init_vcpu (env);if (tcg_initialized)return env;
Modified: trunk/target-i386/helper.c
===================================================================
target-i386/helper.c +3 -2
@@ -1692,7 +1692,8 @@#ifdef CONFIG_KQEMU kqemu_init (env);#endif -if (kvm_enabled ()) -kvm_init_vcpu (env); + +qemu_init_vcpu (env); +return env; }
Modified: trunk/target-m68k/helper.c
===================================================================
target-m68k/helper.c +1 -0
@@ -180,6 +180,7 @@ }cpu_reset (env); +qemu_init_vcpu (env);return env; }
Modified: trunk/target-mips/translate.c
===================================================================
target-mips/translate.c +1 -0
@@ -8551,6 +8551,7 @@ env->cpu_model_str = cpu_model;mips_tcg_init ();cpu_reset (env); +qemu_init_vcpu (env);return env; }
Modified: trunk/target-ppc/helper.c
===================================================================
target-ppc/helper.c +1 -2
@@ -2831,8 +2831,7 @@cpu_ppc_register_internal (env, def);cpu_ppc_reset (env); -if (kvm_enabled ()) -kvm_init_vcpu (env); +qemu_init_vcpu (env);return env; }
Modified: trunk/target-sh4/translate.c
===================================================================
target-sh4/translate.c +1 -0
@@ -290,6 +290,7 @@cpu_sh4_reset (env);cpu_sh4_register (env, def);tlb_flush (env,1 ); +qemu_init_vcpu (env);return env; }
Modified: trunk/target-sparc/helper.c
===================================================================
target-sparc/helper.c +1 -0
@@ -723,6 +723,7 @@return NULL ; }cpu_reset (env); +qemu_init_vcpu (env);return env; }
Modified: trunk/vl.c
===================================================================
vl.c +9 -0
@@ -3731,6 +3731,15 @@return qemu_event_init (); } +void qemu_init_vcpu (void *_env) +{ +CPUState *env = _env; + +if (kvm_enabled ()) +kvm_init_vcpu (env); +return ; +} +#ifdef _WIN32static void host_main_loop_wait (int *timeout) {