Zishuo Wang
Zishuo Wang

Reputation: 81

Can qemu emulates a multi-core environment?

I am using qemu on Fedora and I find that qemu does not support multi-core. When I use the parameter smp and set cores=2, it will tell me that:

mu-system-riscv: Number of SMP CPUs requested (2) exceeds max CPUs supported by machine 'riscv'

Upvotes: 4

Views: 10825

Answers (1)

Peter Maydell
Peter Maydell

Reputation: 11393

In general, QEMU can support multicore guests, yes. However the number of cores supported depends on the particular board (machine) model you're using. The error message is telling you that the 'riscv' machine you've asked for only supports one CPU.

(In TCG emulation at the moment multicore guests won't be any faster than a single core guest because we don't use all the host cores; this should change in QEMU 2.9 for at least some host/guest combinations when multithreaded TCG support lands. KVM supports multicore guests with no problems.)

Upvotes: 6

Related Questions