From 3e6acd8c98089d3ca31d5e8191d03d0772bbd785 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 17 May 2024 13:53:08 +0100 Subject: [PATCH] feat: best guess for arach64 VMs on aarch64/arm64 hosts --- quickemu | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/quickemu b/quickemu index 020b80a..5f6983a 100755 --- a/quickemu +++ b/quickemu @@ -306,8 +306,15 @@ function configure_cpu() { QEMU_ACCEL="kvm" fi - # If the architecture of the VM is different from the host, disable acceleration - if [ "${ARCH_VM}" != "${ARCH_HOST}" ]; then + if [ "${ARCH_VM}" == "aarch64" ]; then + # Support to run aarch64 VMs (best guess; untested) + # https://qemu-project.gitlab.io/qemu/system/arm/virt.html + case ${ARCH_HOST} in + arm64|aarch64) CPU_MODEL="max" + MACHINE_TYPE="virt,highmem=off";; + esac + elif [ "${ARCH_VM}" != "${ARCH_HOST}" ]; then + # If the architecture of the VM is different from the host, disable acceleration CPU_MODEL="qemu64" CPU_KVM_UNHALT="" QEMU_ACCEL="tcg"