Comment 0 for bug 2043471

Revision history for this message
Skia (hyask) wrote : Broken memory map on armhf with more than 3GB of RAM

Hi,

During some autopkgtest debugging, we found that we were unable to boot an armhf virtual machine with more than 3GB of RAM.

Here is the working command line:
```
qemu-system-arm \
-machine virt -m 3G -smp 2 -nographic \
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-pci,rng=rng0,id=rng-device0 \
-drive if=pflash,format=raw,unit=0,read-only=on,file=/usr/share/AAVMF/AAVMF32_CODE.fd \
-device virtio-net-pci,netdev=eth0 \
-netdev user,id=eth0,hostfwd=tcp::8022-:22 \
-drive file=autopkgtest-noble-armhf.img,if=virtio,format=qcow2
```
And here is the broken one, that ends up in a loop of `watchdog: BUG: soft lockup - CPU#1 stuck for 26s!`:
```
qemu-system-arm \
-machine virt -m 4G -smp 2 -nographic \
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-pci,rng=rng0,id=rng-device0 \
-drive if=pflash,format=raw,unit=0,read-only=on,file=/usr/share/AAVMF/AAVMF32_CODE.fd \
-device virtio-net-pci,netdev=eth0 \
-netdev user,id=eth0,hostfwd=tcp::8022-:22 \
-drive file=autopkgtest-noble-armhf.img,if=virtio,format=qcow2
```

Some early boot details:

3GB RAM:
```
[ 0.000000] Linux version 6.5.0-9-generic (buildd@bos02-arm64-028) (arm-linux-gnueabihf-gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) #9-Ubuntu SMP Fri Oct 6 23:14:49 UTC 2023 (Ubuntu 6.5.0-9.9-generic 6.5.3)
[ 0.000000] CPU: ARMv7 Processor [414fc0f0] revision 0 (ARMv7), cr=30c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: linux,dummy-virt
[ 0.000000] random: crng init done
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] efi: EFI v2.7 by Ubuntu distribution of EDK II
[ 0.000000] efi: SMBIOS=0xfffee000 SMBIOS 3.0=0xfffec000 MEMATTR=0xfe991a90 INITRD=0xfc727e90 RNG=0xfc72c010 MEMRESERVE=0xfc727d90
[ 0.000000] secureboot: Secure boot disabled
[ 0.000000] cma: Reserved 32 MiB at 0x00000000fc800000
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x000000006fffffff]
[ 0.000000] Normal empty
[ 0.000000] HighMem [mem 0x0000000070000000-0x00000000ffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000ffc16fff]
[ 0.000000] node 0: [mem 0x00000000ffc17000-0x00000000ffffefff]
[ 0.000000] node 0: [mem 0x00000000fffff000-0x00000000ffffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000ffffffff]
```

4GB RAM:
```
[ 0.000000] Linux version 6.5.0-9-generic (buildd@bos02-arm64-028) (arm-linux-gnueabihf-gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) #9-Ubuntu SMP Fri Oct 6 23:14:49 UTC 2023 (Ubuntu 6.5.0-9.9-generic 6.5.3)
[ 0.000000] CPU: ARMv7 Processor [414fc0f0] revision 0 (ARMv7), cr=30c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: linux,dummy-virt
[ 0.000000] random: crng init done
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] efi: EFI v2.7 by Ubuntu distribution of EDK II
[ 0.000000] efi: SMBIOS=0xfffee000 SMBIOS 3.0=0xfffec000 MEMATTR=0xfe991a90 INITRD=0xfc727e90 RNG=0xfc72c010 MEMRESERVE=0xfc727d90
[ 0.000000] secureboot: Secure boot disabled
[ 0.000000] cma: Reserved 32 MiB at 0x00000000fc800000
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x000000006fffffff]
[ 0.000000] Normal empty
[ 0.000000] HighMem [mem 0x0000000070000000-0x000000013fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000ffc16fff]
[ 0.000000] node 0: [mem 0x00000000ffc17000-0x00000000ffffefff]
[ 0.000000] node 0: [mem 0x00000000fffff000-0x000000013fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000013fffffff]
```

Let me know if further details are needed.