[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [7242] qemu: introduce qemu_init_vcpu (Marcelo Tosatti)
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [7242] qemu: introduce qemu_init_vcpu (Marcelo Tosatti) |
Date: |
Fri, 24 Apr 2009 18:03:41 +0000 |
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)
Signed-off-by: Marcelo Tosatti <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
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.c
Modified: trunk/qemu-common.h
===================================================================
--- trunk/qemu-common.h 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/qemu-common.h 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-alpha/translate.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-alpha/translate.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-arm/helper.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-arm/helper.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-cris/translate.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-cris/translate.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-i386/helper.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-i386/helper.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-m68k/helper.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-m68k/helper.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -180,6 +180,7 @@
}
cpu_reset(env);
+ qemu_init_vcpu(env);
return env;
}
Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-mips/translate.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-ppc/helper.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-ppc/helper.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-sh4/translate.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-sh4/translate.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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
===================================================================
--- trunk/target-sparc/helper.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/target-sparc/helper.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -723,6 +723,7 @@
return NULL;
}
cpu_reset(env);
+ qemu_init_vcpu(env);
return env;
}
Modified: trunk/vl.c
===================================================================
--- trunk/vl.c 2009-04-24 18:03:33 UTC (rev 7241)
+++ trunk/vl.c 2009-04-24 18:03:41 UTC (rev 7242)
@@ -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 _WIN32
static void host_main_loop_wait(int *timeout)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [7242] qemu: introduce qemu_init_vcpu (Marcelo Tosatti),
Anthony Liguori <=