diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-01-25 12:39:54 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-01-25 12:39:54 +0100 |
commit | cd2e4ed389df6d6dabaa530ee5280be8beabe293 (patch) | |
tree | 813c14ab65fe2e5aaa95fcef9853b0c6218d7783 /bin | |
parent | c8398b34897301081ca45804d5003c74237b7452 (diff) | |
download | debvm-cd2e4ed389df6d6dabaa530ee5280be8beabe293.tar.gz |
debvm-run: disable kvm for armhf -> arm64 when the cpu cannot run it
Reported-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/debvm-run | 12 |
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 |