On Thu, Oct 08 2026, David Matlack wrote:
> 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 <[email protected]>
IIUC HVF is only for MacOS. I don't think we care to run this script on
MacOS.
Anyway, thanks for the fix
Reviewed-by: Pratyush Yadav <[email protected]>
> ---
> 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
--
Regards,
Pratyush Yadav