Skip to content

qemu: Do the right thing on aarch64 by default

When qemu emulates an ARM machine, there are a few quirks that made our previous assumptions not work.

This branch relies on infrastructure from !116 (merged) and !113 (merged).


  • !116 (merged) (see that MR for details)

  • !113 (merged) (see that MR for details)

  • qemu: Default to EFI boot on 32- and 64-bit ARM

    This matches the behaviour of build-qemu.

    Thanks: Ryutaroh Matsumoto

  • qemu: Default machine type to virt for ARM family

    qemu doesn't have a default machine to emulate for ARM, so we need to select one explicitly.

  • qemu: Automatically select a kvm-capable VM if testing arm on aarch64

    According to reports from Ryutaroh Matsumoto, qemu-system-arm cannot be kvm-accelerated on aarch64, but qemu-system-aarch64 is kvm-accelerated and can be told to operate in a 32-bit-only mode.

  • qemu: Set a default CPU for qemu-system-aarch64

    qemu-system-aarch64's default CPU is not compatible with -enable-kvm, and doesn't seem to boot at all when emulating aarch64 on x86_64.

    When running natively with -enable-kvm, we can use host or max (presumably synonyms). Let's use host, which is more self-explanatory.

    When running under emulation, -cpu max is unusably slow (at least on x86_64). [1] mentions cortex-a53 as something that works, and that does seem to emulate at an acceptable speed on my laptop - good enough!

    [1] https://translatedcode.wordpress.com/2017/07/24/installing-debian-on-qemus-64-bit-arm-virt-board/

    Thanks: Ryutaroh Matsumoto
    Thanks: Peter Maydell

Edited by Simon McVittie

Merge request reports

Loading