[09/13] testimage.bbclass: request the use of kvm by default

Message ID 20211127095357.1748429-9-alex@linutronix.de
State Accepted, archived
Commit c2a2d475a976225e3a4eb687af6d2a62dca1d2bf
Headers show
Series [01/13] insane.bbclass: add a check that Upstream-Status patch tag is present and correctly formed | expand

Commit Message

Alexander Kanavin Nov. 27, 2021, 9:53 a.m. UTC
In almost all cases there is no need to explicitly ask for it via local.conf
or similar custom config:
it is enabled in qemu_use_kvm() if target_arch == build_arch or both of them are x86 archs,
and QEMU_USE_KVM is set.

If that heuristic doesn't work, QEMU_USE_KVM = "" will do the disabling.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/classes/testimage.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 9980b3f626..e606de25fc 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -36,6 +36,7 @@  TESTIMAGE_AUTO ??= "0"
 # TEST_OVERALL_TIMEOUT can be used to set the maximum time in seconds the tests will be allowed to run (defaults to no limit).
 # TEST_QEMUPARAMS can be used to pass extra parameters to qemu, e.g. "-m 1024" for setting the amount of ram to 1 GB.
 # TEST_RUNQEMUPARAMS can be used to pass extra parameters to runqemu, e.g. "gl" to enable OpenGL acceleration.
+# QEMU_USE_KVM can be set to "" to disable the use of kvm (by default it is enabled if target_arch == build_arch or both of them are x86 archs)
 
 # TESTIMAGE_BOOT_PATTERNS can be used to override certain patterns used to communicate with the target when booting,
 # if a pattern is not specifically present on this variable a default will be used when booting the target.
@@ -75,6 +76,7 @@  DEFAULT_TEST_SUITES:remove:qemumips64 = "${MIPSREMOVE}"
 
 TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
 
+QEMU_USE_KVM ?= "1"
 TEST_QEMUBOOT_TIMEOUT ?= "1000"
 TEST_OVERALL_TIMEOUT ?= ""
 TEST_TARGET ?= "qemu"