summaryrefslogtreecommitdiff
path: root/bin/debvm-run
diff options
context:
space:
mode:
Diffstat (limited to 'bin/debvm-run')
-rwxr-xr-xbin/debvm-run12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/debvm-run b/bin/debvm-run
index 0e9403f..0d2ee95 100755
--- a/bin/debvm-run
+++ b/bin/debvm-run
@@ -292,7 +292,19 @@ case "$KERNELARCH" in
;;
esac
+ENABLE_KVM=no
if test "$ARCHITECTURE" = "$KERNELARCH"; then
+ ENABLE_KVM=yes
+ case "$VMARCH:$KERNELARCH" in
+ arm:arm64|armel:arm64|armhf:arm64)
+ if ! linux32 true >/dev/null 2>&1; then
+ # This arm64 cannot run 32bit arm, so don't try KVM.
+ ENABLE_KVM=no
+ fi
+ ;;
+ esac
+fi
+if test "$ENABLE_KVM" = yes; then
if ! command -v "$QEMU" >/dev/null 2>&1; then
# Fall back to kvm in case we badly guessed qemu.
QEMU=kvm