diff options
author | Jiri Denemark <jdenemar@redhat.com> | 2010-01-05 17:26:34 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-01-11 10:03:18 -0600 |
commit | fe46a160ce16a394395fa9d9a46680416f41e85a (patch) | |
tree | 3d04425ee85cc66689837464700094b0f6df3bf7 /vl.c | |
parent | 8033c42abdfa7b583b3a42c8877f35164e5f776b (diff) |
Fix CPU topology initialization
Late initialization of CPU topology in CPUState prevents KVM guests to
actually see the topology.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 3f7638ec4093100a63b18cbacd45dcd847f7c06b)
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |