Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can qemu emulates a multi-core environment?

Tags:

qemu

multicore

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'

like image 230
Zishuo Wang Avatar asked Sep 06 '25 23:09

Zishuo Wang


1 Answers

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.)

like image 150
Peter Maydell Avatar answered Sep 11 '25 00:09

Peter Maydell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!