1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
id = 2194
title = "qemu-system-mips64el loongson3-virt fails to complete boot"
state = "closed"
created_at = "2024-02-26T14:14:50.870Z"
closed_at = "2024-02-27T17:36:20.808Z"
labels = []
url = "https://gitlab.com/qemu-project/qemu/-/issues/2194"
host-os = "macOS"
host-arch = "arm64"
qemu-version = "8.2.1"
guest-os = "Debian"
guest-arch = "mips64el (loongson3-virt)"
description = """I try to install Debian 12 using the netboot kernel (6.1.0) and initrd:
```
NETBOOT=http://ftp.debian.org/debian/dists/stable/main/installer-mips64el/current/images/loongson-3/netboot
wget $NETBOOT/initrd.gz
wget $NETBOOT/vmlinuz-6.1.0-18-loongson-3 -O vmlinuz
qemu-img create -f qcow2 disk.qcow2 30G
```
Then I boot the installer:
```
qemu-system-mips64el \\
-machine loongson3-virt -cpu Loongson-3A1000 -smp 4 -m 6G -nographic \\
-kernel vmlinuz -initrd initrd.gz \\
-drive file=disk.qcow2,if=none,id=drive-virtio-disk0 \\
-device virtio-blk-pci,drive=drive-virtio-disk0 \\
-append "root=/dev/sda1"
```
The boot stops after this:
```
[ 0.000000] Linux version 6.1.0-18-loongson-3 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 6.1.76-1 (2024-02-01)
[ 0.000000] Firmware: Coherent DMA: on
[ 0.000000] CpuClock = 800000000
[ 0.000000] The bridge chip is VIRTUAL
[ 0.000000] CP0_Config3: CP0 16.3 (0x80)
[ 0.000000] CP0_PageGrain: CP0 5.1 (0x20000000)
[ 0.000000] NUMA: Discovered 4 cpus on 1 nodes
[ 0.000000] Node 0, mem_type:1\t[0x0000000000000000], 0x000000000f000000 bytes usable
[ 0.000000] Node 0, mem_type:2\t[0x0000000090000000], 0x0000000170000000 bytes usable
[ 0.000000] Node0's addrspace_offset is 0x0
[ 0.000000] Node0: start_pfn=0x0, end_pfn=0x80000
[ 0.000000] NUMA: set cpumask cpu 0 on node 0
[ 0.000000] NUMA: set cpumask cpu 1 on node 0
[ 0.000000] NUMA: set cpumask cpu 2 on node 0
[ 0.000000] NUMA: set cpumask cpu 3 on node 0
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00006305 (ICT Loongson-3)
[ 0.000000] FPU revision is: 00770501
[ 0.000000] MIPS: machine is loongson,loongson64v-4core-virtio
[ 0.000000] Initial ramdisk at: 0x9800000004000000 (28553950 bytes)
[ 0.000000] software IO TLB: area num 1.
[ 0.000000] software IO TLB: mapped [mem 0x0000000005b3c000-0x0000000009b3c000] (64MB)
[ 0.000000] DMI not present or invalid.
[ 0.000000] Detected 4 available CPU(s)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 64kB, 4-way, VIPT, no aliases, linesize 32 bytes
[ 0.000000] Unified victim cache 0kB direct mapped, linesize 0 bytes.
[ 0.000000] Unified secondary cache 4096kB 4-way, linesize 32 bytes.
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x00000001ffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000effffff]
[ 0.000000] node 0: [mem 0x0000000090000000-0x00000001ffffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000001ffffffff]
[ 0.000000] On node 0, zone DMA32: 1024 pages in unavailable ranges
[ 0.000000] percpu: Embedded 13 pages/cpu s170800 r8192 d34000 u212992
[ 0.000000] Fallback order for Node 0: 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 390660
[ 0.000000] Policy zone: Normal
[ 0.000000] Kernel command line: rd_start=0xffffffff84000000 rd_size=28553950 root=/dev/sda1 nokaslr
[ 0.000000] Unknown kernel command line parameters "nokaslr", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 1048576 (order: 9, 8388608 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 524288 (order: 8, 4194304 bytes, linear)
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off
[ 0.000000] Memory: 2183328K/6275072K available (11247K kernel code, 1773K rwdata, 3152K rodata, 2688K init, 547K bss, 184208K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 32150 entries in 32 pages
[ 0.000000] ftrace: allocated 32 pages with 1 groups
[ 0.000000] trace event string verifier disabled
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: \tRCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[ 0.000000] \tTrampoline variant of Tasks RCU enabled.
[ 0.000000] \tRude variant of Tasks RCU enabled.
[ 0.000000] \tTracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 320
[ 0.000000] ISA Bridge: /bus@10000000/isa@18000000
[ 0.000000] IO 0x0000000018000000..0x0000000018003fff -> 0x0000000000000000
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4778151116 ns
[ 0.000072] sched_clock: 32 bits at 400MHz, resolution 2ns, wraps every 5368709118ns
[ 0.002813] Console: colour dummy device 80x25
[ 0.003195] printk: console [tty0] enabled
[ 0.005876] printk: bootconsole [early0] disabled
```
Then, nothing happens. The qemu process uses 100% CPU on the host.
I tried with `-smp 1` and got the same result."""
reproduce = "n/a"
additional = "n/a"
|