mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 16:42:20 +00:00
fix(hack): use the host CPU model for accelerated aarch64 VMs
The aarch64 dev VM always used -cpu cortex-a57, even with -accel hvf or -accel kvm. QEMU rejects named CPU models with hvf, and with KVM unless the host has that CPU, so booting natively on Apple Silicon or an aarch64 Linux host with KVM failed. Use -cpu host when accelerated.
This commit is contained in:
1 parent
592d7b41f6
commit
c9586ff68d
1 file changed
+5
@@ -15,7 +15,12 @@ set --
|
||||
if [ "${TARGET_ARCH}" = "x86_64" ]; then
|
||||
set -- "${@}" qemu-system-x86_64 -M q35 -cpu SandyBridge,vmx=on
|
||||
elif [ "${TARGET_ARCH}" = "aarch64" ]; then
|
||||
# Hardware acceleration on aarch64 only supports the host CPU model.
|
||||
if [ -n "${QEMU_ACCEL}" ] && [ "${QEMU_ACCEL}" != "tcg" ]; then
|
||||
set -- "${@}" qemu-system-aarch64 -M virt -cpu host
|
||||
else
|
||||
set -- "${@}" qemu-system-aarch64 -M virt -cpu cortex-a57
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${QEMU_ACCEL}" ]; then
|
||||
|
||||
Reference in new issue
Block a user