提交 3f7638ec 编写于 作者: J Jiri Denemark 提交者: Anthony Liguori

Fix CPU topology initialization

Late initialization of CPU topology in CPUState prevents KVM guests to
actually see the topology.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 af364b41
......@@ -3484,10 +3484,10 @@ void qemu_init_vcpu(void *_env)
{
CPUState *env = _env;
if (kvm_enabled())
kvm_init_vcpu(env);
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled())
kvm_init_vcpu(env);
return;
}
......@@ -3813,12 +3813,12 @@ void qemu_init_vcpu(void *_env)
{
CPUState *env = _env;
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled())
kvm_start_vcpu(env);
else
tcg_init_vcpu(env);
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
}
void qemu_notify_event(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册