From c24a261233a2623f3a07c4a9411eb00d002e6feb Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 21 Jul 2023 14:17:14 +0200 Subject: [PATCH] tools: Do not use KVM when it's not supported --- tools/fast-run.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/fast-run.sh b/tools/fast-run.sh index 74401249..3adbb091 100755 --- a/tools/fast-run.sh +++ b/tools/fast-run.sh @@ -5,4 +5,11 @@ source $(dirname $0)/env.sh cd $LUNA_ROOT -qemu-system-$LUNA_ARCH -cdrom Luna.iso -smp 1 -m 256M -serial stdio -enable-kvm $@ +if [ -c /dev/kvm ] +then +EXTRA_FLAGS="-enable-kvm" +else +EXTRA_FLAGS="" +fi + +qemu-system-$LUNA_ARCH -cdrom Luna.iso -smp 1 -m 256M -serial stdio $EXTRA_FLAGS $@