Pure interface cosmetics: Ensure that only kvm core services (as
declared in kvm.h) start with "kvm_". Prepend "qemu_" to those that
violate this rule in cpus.c. Also rename the corresponding tcg functions
for the sake of consistency.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
static int qemu_cpu_exec(CPUState *env);
static int qemu_cpu_exec(CPUState *env);
-static void *kvm_cpu_thread_fn(void *arg)
+static void *qemu_kvm_cpu_thread_fn(void *arg)
{
CPUState *env = arg;
int r;
{
CPUState *env = arg;
int r;
-static void *tcg_cpu_thread_fn(void *arg)
+static void *qemu_tcg_cpu_thread_fn(void *arg)
-static void tcg_init_vcpu(void *_env)
+static void qemu_tcg_init_vcpu(void *_env)
{
CPUState *env = _env;
/* share a single thread for all cpus with TCG */
{
CPUState *env = _env;
/* share a single thread for all cpus with TCG */
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
- qemu_thread_create(env->thread, tcg_cpu_thread_fn, env);
+ qemu_thread_create(env->thread, qemu_tcg_cpu_thread_fn, env);
while (env->created == 0)
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
tcg_cpu_thread = env->thread;
while (env->created == 0)
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
tcg_cpu_thread = env->thread;
-static void kvm_start_vcpu(CPUState *env)
+static void qemu_kvm_start_vcpu(CPUState *env)
{
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
{
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
- qemu_thread_create(env->thread, kvm_cpu_thread_fn, env);
+ qemu_thread_create(env->thread, qemu_kvm_cpu_thread_fn, env);
while (env->created == 0)
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
}
while (env->created == 0)
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
}
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled())
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled())
+ qemu_kvm_start_vcpu(env);
+ qemu_tcg_init_vcpu(env);
}
void qemu_notify_event(void)
}
void qemu_notify_event(void)