smp: linux guest only sees 1 CPU when not using KVM
Well, thre's nothing more to add than the contents in the subject.
I tried booting up with -smp 2, and /proc/cpuinfo on the linux guest only return one CPU, while booting with "-smp 2 -enable-kvm" shows 2 CPUs.
Lluis
Signature · 4 lines
"And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth
Quoted 5 lines · Lluís
Well, thre's nothing more to add than the contents in the subject.
I tried booting up with -smp 2, and
/proc/cpuinfoon the linux guest only return one CPU, while booting with "-smp 2 -enable-kvm" shows 2 CPUs.
I was under the impression qemu didn't emulate SMP. KVM on the other hand does support running on real SMP hardware. It doesn't have to emulate SMP after all.
Signature · 1 line
Len Sorensen
Quoted 10 lines · Lennart Sorensen
Quoted 5 lines · Lluís
Well, thre's nothing more to add than the contents in the subject.
I tried booting up with -smp 2, and
/proc/cpuinfoon the linux guest only return one CPU, while booting with "-smp 2 -enable-kvm" shows 2 CPUs.I was under the impression qemu didn't emulate SMP. KVM on the other hand does support running on real SMP hardware. It doesn't have to emulate SMP after all.
Well, I thought it did when I saw the "-smp" option, and it does in fact create multiple CPUState objects, as if the "extra" cpus where unplugged.
In fact, cpus.c:cpu_exec_all does indeed loop through all the CPUState objects, calling qemu_cpu_exec on each.
Lluis
Signature · 4 lines
"And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth
Quoted 13 lines · Lluís
Quoted 10 lines · Lennart Sorensen
Quoted 5 lines · Lluís
Well, thre's nothing more to add than the contents in the subject.
I tried booting up with -smp 2, and
/proc/cpuinfoon the linux guest only return one CPU, while booting with "-smp 2 -enable-kvm" shows 2 CPUs.I was under the impression qemu didn't emulate SMP. KVM on the other hand does support running on real SMP hardware. It doesn't have to emulate SMP after all.
Quoted 7 lines
Well, I thought it did when I saw the "-smp" option, and it does in fact create multiple CPUState objects, as if the "extra" cpus where unplugged.
In fact, cpus.c:cpu_exec_all does indeed loop through all the CPUState objects, calling
qemu_cpu_execon each.
Yes. Qemu should emulate smp fine. What "info cpus" in monitor shows? Anything interesting in dmesg?
--
Gleb.
Quoted 2 lines · Gleb Natapov
Yes. Qemu should emulate smp fine. What "info cpus" in monitor shows? Anything interesting in dmesg?
Hmpf. I tried again with a clean version, so either I was too sleepy yesterday or my changes unexpectedly broke SMP.
As I still have to resolve some conflicts, I'll try later and reply in case the problem persists.
In any case sorry for the inconvenience.
Lluis
Signature · 4 lines
"And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth