mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Matlack <dmatlack@google.com>
To: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org
Cc: Jordan Richards <jordanrichards@google.com>,
	Mike Rapoport <rppt@kernel.org>,
	 Pasha Tatashin <pasha.tatashin@soleen.com>,
	Pratyush Yadav <pratyush@kernel.org>,
	 Shuah Khan <shuah@kernel.org>,
	David Matlack <dmatlack@google.com>
Subject: [PATCH] selftests/liveupdate: Prefer KVM and HVF over TCG in vmtest.sh
Date: Thu,  8 Oct 2026 13:28:13 +0000	[thread overview]
Message-ID: <20261008132813.1966023-1-dmatlack@google.com> (raw)

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


             reply	other threads:[~2026-10-08 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 13:28 David Matlack [this message]
2026-10-08 13:33 ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261008132813.1966023-1-dmatlack@google.com \
    --to=dmatlack@google.com \
    --cc=jordanrichards@google.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®