Skip to content

qemu-system-arm regression with Qemu 9.0.0

Host environment

  • Operating system: Debian 11
  • OS/kernel version: Linux helium 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/Linux
  • Architecture: ARM
  • QEMU flavor: qemu-system-arm
  • QEMU version: 9.0.0
  • QEMU command line: qemu-system-arm -M vexpress-a9 -nographic -cpu cortex-a9 -net user -net nic,model=lan9118 -dtb vexpress-v2p-ca9.dtb -kernel qemu-arm-vexpress-a9-initramfspiggyback-kernel -qmp tcp:127.0.0.1:4444,server,nowait -no-reboot

Emulated/Virtualized environment

  • Operating system: OpenADK with uClibc-ng
  • OS/kernel version: Linux 6.6.28
  • Architecture: ARMv7 (thumb2)

Description of problem

Bootup of the userland crashes:

[    1.713693] Run /init as init process
[    2.372470] Alignment trap: not handling instruction f8530b04 at [<0001225a>]
[    2.391053] 8<--- cut here ---
[    2.392942] Unhandled fault: alignment exception (0x001) at 0x00035335
[    2.397042] [00035335] *pgd=6066b831, *pte=6030734f, *ppte=6030783f

Steps to reproduce

wget https://debug.openadk.org/vexpress-v2p-ca9.dtb

wget https://debug.openadk.org/qemu-arm-vexpress-a9-initramfspiggyback-kernel

qemu-system-arm -M vexpress-a9 -nographic -cpu cortex-a9 -net user -net nic,model=lan9118 -dtb vexpress-v2p-ca9.dtb -kernel qemu-arm-vexpress-a9-initramfspiggyback-kernel -qmp tcp:127.0.0.1:4444,server,nowait -no-reboot

Additional information

It works fine for ARM instruction set, but not for Thumb2.

Git bisect showed following commit as the problematic one:
From 59754f85 Mon Sep 17 00:00:00 2001
From: Richard Henderson richard.henderson@linaro.org
Date: Fri, 1 Mar 2024 10:41:09 -1000
Subject: [PATCH] target/arm: Do memory type alignment check when translation disabled

Edited by Michael Tokarev
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information