mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
qemu: use 4 cores in qemu guests
Each of the cores is mapped to a thread on the host, this should speed up things inside qemu which can take advantage of that. (From OE-Core rev: 56f98d12a79585a4d4c459160f39403e05b620a5) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
64ba8fc55b
commit
1584108bdc
|
@ -19,6 +19,9 @@
|
||||||
# QB_CPU_KVM: the similar to QB_CPU, but used when kvm, e.g., '-cpu kvm64',
|
# QB_CPU_KVM: the similar to QB_CPU, but used when kvm, e.g., '-cpu kvm64',
|
||||||
# set it when support kvm.
|
# set it when support kvm.
|
||||||
#
|
#
|
||||||
|
# QB_SMP: amount of CPU cores inside qemu guest, each mapped to a thread on the host,
|
||||||
|
# e.g. "-smp 8".
|
||||||
|
#
|
||||||
# QB_KERNEL_CMDLINE_APPEND: options to append to kernel's -append
|
# QB_KERNEL_CMDLINE_APPEND: options to append to kernel's -append
|
||||||
# option, e.g., "console=ttyS0 console=tty"
|
# option, e.g., "console=ttyS0 console=tty"
|
||||||
#
|
#
|
||||||
|
@ -80,6 +83,7 @@
|
||||||
# See "runqemu help" for more info
|
# See "runqemu help" for more info
|
||||||
|
|
||||||
QB_MEM ?= "-m 256"
|
QB_MEM ?= "-m 256"
|
||||||
|
QB_SMP ?= "-smp 4"
|
||||||
QB_SERIAL_OPT ?= "-serial mon:stdio -serial null"
|
QB_SERIAL_OPT ?= "-serial mon:stdio -serial null"
|
||||||
QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}"
|
QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}"
|
||||||
QB_DEFAULT_FSTYPE ?= "ext4"
|
QB_DEFAULT_FSTYPE ?= "ext4"
|
||||||
|
|
|
@ -540,13 +540,13 @@ class BaseConfig(object):
|
||||||
def check_kvm(self):
|
def check_kvm(self):
|
||||||
"""Check kvm and kvm-host"""
|
"""Check kvm and kvm-host"""
|
||||||
if not (self.kvm_enabled or self.vhost_enabled):
|
if not (self.kvm_enabled or self.vhost_enabled):
|
||||||
self.qemu_opt_script += ' %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU'))
|
self.qemu_opt_script += ' %s %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU'), self.get('QB_SMP'))
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.get('QB_CPU_KVM'):
|
if not self.get('QB_CPU_KVM'):
|
||||||
raise RunQemuError("QB_CPU_KVM is NULL, this board doesn't support kvm")
|
raise RunQemuError("QB_CPU_KVM is NULL, this board doesn't support kvm")
|
||||||
|
|
||||||
self.qemu_opt_script += ' %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU_KVM'))
|
self.qemu_opt_script += ' %s %s %s' % (self.get('QB_MACHINE'), self.get('QB_CPU_KVM'), self.get('QB_SMP'))
|
||||||
yocto_kvm_wiki = "https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu"
|
yocto_kvm_wiki = "https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu"
|
||||||
yocto_paravirt_kvm_wiki = "https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM"
|
yocto_paravirt_kvm_wiki = "https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM"
|
||||||
dev_kvm = '/dev/kvm'
|
dev_kvm = '/dev/kvm'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user