booting linux hangs with -cpu max or -cpu max,lpa2=off, but works with -cpu cortex-a57
Host environment
- Operating system: FreeBSD
- OS/kernel version: FreeBSD rebo 14.0-CURRENT FreeBSD 14.0-CURRENT #12 blake3-2-n256626-3684f6fb0733: Fri Jul 8 13:21:17 MDT 2022 imp@rebo:/usr/home/imp/obj/usr/home/imp/git/head/amd64.amd64/sys/GENERIC amd64
- Architecture: x86 (host)
- QEMU flavor: qemu-system-aarch64
- QEMU version: QEMU emulator version 7.0.94 (v7.1.0-rc4-dirty)
- QEMU command line:
/home/imp/git/qemu/00-build/qemu-system-aarch64 -nographic -machine virt,gic-version=max -m 512M -cpu cortex-a57 -netdev user,id=vnet,hostfwd=:127.0.0.1:0-:22 -device virtio-net-pci,netdev=vnet -drive file=ubuntu-image.img,if=none,id=drive0,cache=writeback -device virtio-blk,drive=drive0,bootindex=0 -drive file=mini.iso,if=none,id=drive1,cache=writeback -device virtio-blk,drive=drive1,bootindex=1 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflashEmulated/Virtualized environment
- Operating system: ubuntu
- OS/kernel version: latest (hangs, so I can't boot to tell you)
- Architecture: aarch64
Description of problem
Steps to reproduce
- Snag mini.iso from http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/installer-arm64/current/images/netboot/mini.iso
- qemu-img create ubuntu-image.img 20G
- dd if=/dev/zero of=flash1.img bs=1M count=64
- dd if=/dev/zero of=flash0.img bs=1M count=64
- dd if=/home/imp/git/qemu/00-build/pc-bios/edk2-aarch64-code.fd of=flash0.img conv=notrunc
- Run the above command
- Select install, watch the kernel hang.
- Change -cpu max to -cpu cortex-a57 and it will work. -cpu max,lpa2=off also exhibits the problem
Additional information
Just grabbed git and built it with ./configure in /home/imp/git/qemu/00-build.
pm215 on irc suggested that it was an old EDK2 and a newer one is needed to cope with the newer CPU features in -cpu max