mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests/liveupdate: Prefer KVM and HVF over TCG in vmtest.sh
@ 2026-10-08 13:28 David Matlack
  2026-10-08 13:33 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: David Matlack @ 2026-10-08 13:28 UTC (permalink / raw)
  To: kexec, linux-kernel, linux-kselftest
  Cc: Jordan Richards, Mike Rapoport, Pasha Tatashin, Pratyush Yadav,
	Shuah Khan, David Matlack

Pass the -accel options to QEMU in the order KVM, HVF, TCG, so that
vmtest.sh prefers to use KVM and HVF over TCG when they are available.

QEMU uses the first accelerator in the list that initializes, and TCG
always initializes, so the tests currently always run under TCG, even
though the commit that added vmtest.sh describes "automatic accelerator
detection (KVM, HVF, or TCG)".

Fixes: 89dd1421c554 ("selftests/liveupdate: add end to end test infrastructure and scripts")
Signed-off-by: David Matlack <dmatlack@google.com>
---
Tested by running run-vmtests.sh and then observed that arm64 correctly
fell back to using TCG after trying to use KVM and HVF, and that x86
reported no warnings.

arm64:
  qemu-system-aarch64: -accel kvm: invalid accelerator kvm
  qemu-system-aarch64: -accel hvf: invalid accelerator hvf
  qemu-system-aarch64: falling back to tcg

x86:
  (not warnings)

 tools/testing/selftests/liveupdate/vmtest.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/liveupdate/vmtest.sh b/tools/testing/selftests/liveupdate/vmtest.sh
index 64fd2ab55b76..69beda6c961d 100755
--- a/tools/testing/selftests/liveupdate/vmtest.sh
+++ b/tools/testing/selftests/liveupdate/vmtest.sh
@@ -180,7 +180,7 @@ function run_qemu() {
 	echo "# Serial Log: $serial"
 	timeout 30s \
 	$qemu_cmd -m 1G -smp 2 -no-reboot -nographic -nodefaults \
-		  -accel tcg -accel hvf -accel kvm \
+		  -accel kvm -accel hvf -accel tcg \
 		  -serial file:"$serial" \
 		  -append "$cmdline" \
 		  -kernel "$kernel_path" \

base-commit: 80cf37169daef112b6bea9ae7d9808355a045475
-- 
2.56.0.360.g66cac248cb-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-08 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 13:28 [PATCH] selftests/liveupdate: Prefer KVM and HVF over TCG in vmtest.sh David Matlack
2026-10-08 13:33 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®