Bug 9258 - [Anolis23.1 GA][ANCK-6.6.25-2][loongarch64]使用debug版本QEMU_EFI.fd时,虚拟机启动失败
Summary: [Anolis23.1 GA][ANCK-6.6.25-2][loongarch64]使用debug版本QEMU_EFI.fd时,虚拟机启动失败
Status: IN_PROGRESS
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: ---> ToBeTriaged (show other bugs) ---> ToBeTriaged
Version: 23.1
Hardware: loongarch Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: gaochang
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-30 16:04 UTC by wuzhiguo
Modified: 2024-08-13 16:12 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wuzhiguo loongson_group 2024-05-30 16:04:01 UTC
Description of problem:
虚拟机内核版本为6.6.25-2.1.an23.loongarch64,使用debug版本QEMU_EFI.fd时,虚拟机启动失败

Version-Release number of selected component (if applicable):
系统版本: Anolis 23.1
物理机/虚拟机内核版本: 6.6.25-2.1.an23.loongarch64
qemu版本: qemu-8.2.0-14.an23
edk2版本: edk2-loongarch64-202402-4.an23.noarch
虚拟机qcow2: https://mirrors.openanolis.cn/anolis/23.1/isos/GA/loongarch64/AnolisOS-23.1-loongarch64.qcow2

How reproducible:


Steps to Reproduce:
1. 启动虚拟机,命令如下:
/usr/bin/qemu-system-loongarch64 \
    -name 'avocado-vt-vm1' \
    -cpu 'la464-loongarch-cpu' \
    -machine virt,accel=kvm \
    -m 4096 \
    -smp 2 \
    -bios /usr/share/edk2/loongarch64/QEMU_EFI.fd \
    -boot c -d int \
    -drive file=AnolisOS-23.1-loongarch64.qcow2,if=virtio \
    -device virtio-vga \
    -vnc :0 \
    -serial stdio \
    -monitor telnet:localhost:1000,server,nowait


Actual results:
虚拟机启动失败,虚拟机内核报错信息如下:
[    1.293725][    T1] Kernel ade access[#1]:
[    1.293730][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.25-2.1.an23.loongarch64 #1
[    1.293734][    T1] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
[    1.293735][    T1] pc 9000000003841a44 ra 90000000038417cc tp 900000010029c000 sp 900000010029f640
[    1.293738][    T1] a0 90000001046fc800 a1 2fafafaf401ce800 a2 0000000000000000 a3 0000000000000000
[    1.293740][    T1] a4 0000000000000190 a5 0000000000000040 a6 0000000000000000 a7 0720072007200720
[    1.293742][    T1] t0 2fafafaf401cf480 t1 0000000000000007 t2 0000000000000000 t3 0000000000000040
[    1.293744][    T1] t4 0000000000000c80 t5 0720072c07730774 t6 0720075107520749 t7 00000000000000c8
[    1.293746][    T1] t8 0000000000000005 u0 0000000000000000 s9 0000000000000020 s0 0000000000e74000
[    1.293748][    T1] s1 0000000000000000 s2 0000000000006400 s3 90000000038419a0 s4 900000010029f6a0
[    1.293750][    T1] s5 9000000004c61000 s6 90000001046fc800 s7 0000000000000008 s8 2fafafaf401ce800
[    1.293752][    T1]    ra: 90000000038417cc cfb_fillrect+0x14c/0x320
[    1.293765][    T1]   ERA: 9000000003841a44 bitfill_aligned+0xa4/0x120
[    1.293769][    T1]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[    1.293781][    T1]  PRMD: 00000004 (PPLV0 +PIE -PWE)
[    1.293812][    T1]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[    1.293818][    T1]  ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7)
[    1.293823][    T1] ESTAT: 00480000 [ADEM] (IS= ECode=8 EsubCode=1)
[    1.293827][    T1]  BADV: 2fafafaf401ce800
[    1.293829][    T1]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
[    1.293832][    T1] Modules linked in:
[    1.293834][    T1] Process swapper/0 (pid: 1, threadinfo=(____ptrval____), task=(____ptrval____))
[    1.293839][    T1] Stack : 9000000109d47600 9000000100051ce8 900000010004ff38 9000000100051900
[    1.293846][    T1]         9000000109d9f800 900000010029f6a0 0000000000000008 0000000000000250
[    1.293850][    T1]         0000000000000320 90000001046fc800 9000000100022c00 900000000383ca90
[    1.293855][    T1]         0000025000000000 0000000800000320 0000000000000000 81da737424bac5fd
[    1.293860][    T1]         0000000800000000 0000000000000720 9000000005625ef8 0000000000000000
[    1.293865][    T1]         0000000000000064 ffffffffffffff38 0000000000000000 9000000003838590
[    1.293870][    T1]         0000002000000060 0000000000000064 00000000000003e8 0000000000000000
[    1.293875][    T1]         0000000000000000 0000000000000000 0000000000000025 fffffffffffffc18
[    1.293880][    T1]         0000002000000060 0000000000000001 9000000005629000 9000000100022c00
[    1.293884][    T1]         9000000109d44800 0000000000000064 0000000000000025 90000001046fc800
[    1.293889][    T1]         ...
[    1.293891][    T1] Call Trace:
[    1.293894][    T1] [<9000000003841a44>] bitfill_aligned+0xa4/0x120
[    1.293900][    T1] [<90000000038417cc>] cfb_fillrect+0x14c/0x320
[    1.293904][    T1] [<900000000383ca90>] bit_clear_margins+0xf0/0x140
[    1.293907][    T1] [<9000000003838590>] fbcon_prepare_logo+0x450/0x4e0
[    1.293910][    T1] [<900000000383a960>] fbcon_init+0x3e0/0x540
[    1.293914][    T1] [<90000000039090c4>] visual_init+0xc4/0x140
[    1.293921][    T1] [<900000000390cf24>] do_bind_con_driver.isra.0+0x204/0x460
[    1.293926][    T1] [<900000000390d1dc>] do_take_over_console+0x5c/0x80
[    1.293930][    T1] [<90000000038374ec>] do_fbcon_takeover+0x6c/0x100
[    1.293934][    T1] [<900000000383c078>] fbcon_fb_registered+0x138/0x1a0
[    1.293937][    T1] [<900000000382d0b0>] do_register_framebuffer+0x170/0x260
[    1.293941][    T1] [<900000000382d1d4>] register_framebuffer+0x34/0x60
[    1.293945][    T1] [<900000000384ef84>] efifb_probe+0x864/0x8c0
[    1.293950][    T1] [<90000000039e020c>] platform_probe+0x6c/0xe0
[    1.293956][    T1] [<90000000039dc568>] really_probe+0xc8/0x440
[    1.293959][    T1] [<90000000039dc970>] __driver_probe_device+0x90/0x1c0
[    1.293962][    T1] [<90000000039dcadc>] driver_probe_device+0x3c/0xe0
[    1.293965][    T1] [<90000000039dcc54>] __device_attach_driver+0xd4/0x1a0
[    1.293968][    T1] [<90000000039d99a0>] bus_for_each_drv+0xa0/0x120
[    1.293971][    T1] [<90000000039dd210>] __device_attach+0xb0/0x1e0
[    1.293974][    T1] [<90000000039daf34>] bus_probe_device+0xb4/0xe0
[    1.293977][    T1] [<90000000039d7584>] device_add+0x564/0x7e0
[    1.293983][    T1] [<90000000039dfa38>] platform_device_add+0x138/0x300
[    1.293987][    T1] [<9000000004026450>] sysfb_init+0x100/0x140
[    1.293995][    T1] [<9000000002d30cb0>] do_one_initcall+0x70/0x280
[    1.294000][    T1] [<9000000003fe1074>] do_initcalls+0x11c/0x168
[    1.294008][    T1] [<9000000003fe12bc>] kernel_init_freeable+0x188/0x1cc
[    1.294012][    T1] [<9000000003fce230>] kernel_init+0x28/0x138
[    1.294020][    T1] [<9000000002d31f08>] ret_from_kernel_thread+0xc/0xa4
[    1.294023][    T1] 
[    1.294024][    T1] Code: 0041198c  0010b0ac  03400000 <270000a7> 001500ad  29c020a7  29c040a7  29c060a7  29c080a7 
[    1.294034][    T1] 
[    1.294036][    T1] ---[ end trace 0000000000000000 ]---
[    1.294041][    T1] Kernel panic - not syncing: Fatal exception
[    1.294062][    T1] Kernel relocated by 0x2b10000
[    1.294065][    T1]  .text @ 0x9000000002d10000
[    1.294068][    T1]  .data @ 0x9000000004110000
[    1.294069][    T1]  .bss  @ 0x9000000005547200
[    1.294386][    T1] Kernel ade access[#2]:
[    1.294389][    T1] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G      D            6.6.25-2.1.an23.loongarch64 #1
[    1.294392][    T1] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
[    1.294393][    T1] pc 9000000003842aec ra 900000000383da14 tp 900000010029c000 sp 900000010029f000
[    1.294395][    T1] a0 0000000000000001 a1 0000000000000002 a2 9000000100052000 a3 90000001046fc800
[    1.294397][    T1] a4 2fafafaf4016a800 a5 0000000000000004 a6 0000000000000001 a7 0000000000000008
[    1.294399][    T1] t0 9000000100052001 t1 2fafafaf4016a820 t2 0000000000000001 t3 9000000100052001
[    1.294401][    T1] t4 0000000000000000 t5 000000000000000f t6 0000000000000020 t7 0000000000000001
[    1.294402][    T1] t8 0000000000000001 u0 0000000000000000 s9 0000000000000000 s0 0000000000000001
[    1.294403][    T1] s1 ffffffffffffffff s2 9000000004c61000 s3 0000000000000004 s4 0000000000000002
[    1.294405][    T1] s5 0000000000000000 s6 900000010029f070 s7 0000000000000003 s8 2fafafaf4016a800
[    1.294406][    T1]    ra: 900000000383da14 soft_cursor+0x1b4/0x260
[    1.294411][    T1]   ERA: 9000000003842aec fast_imageblit.isra.0+0x2ac/0x520
[    1.294414][    T1]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[    1.294420][    T1]  PRMD: 00000000 (PPLV0 -PIE -PWE)
[    1.294423][    T1]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[    1.294426][    T1]  ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7)
[    1.294430][    T1] ESTAT: 00480000 [ADEM] (IS= ECode=8 EsubCode=1)
[    1.294432][    T1]  BADV: 2fafafaf4016a800
[    1.294434][    T1]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
[    1.294435][    T1] Modules linked in:
[    1.294436][    T1] Process swapper/0 (pid: 1, threadinfo=(____ptrval____), task=(____ptrval____))
[    1.294438][    T1] Stack : 0000000000000001 0000000000000020 0000000000000020 0000000000000000
[    1.294442][    T1]         9000000104d49980 0000000000000000 0000000000000000 0000000000000000
[    1.294446][    T1]         0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    1.294450][    T1]         0000000000000000 81da737424bac5fd 0000000000000060 0000000000000010
[    1.294453][    T1]         9000000104d499d0 0000000000000010 0000000000000001 9000000100052000
[    1.294457][    T1]         0000000000000001 90000001046fc800 900000010029f160 9000000104d49980
[    1.294460][    T1]         ffffffffffffffff 900000000383da14 0000000000000060 000000010383d400
[    1.294464][    T1]         0000000000000010 0000000000000002 9000000004c61000 0000000000000000
[    1.294467][    T1]         900000000417b190 90000001046fc800 0000000000000007 9000000100009be0
[    1.294471][    T1]         9000000100022c00 9000000109d44800 0000000000000001 900000000383d54c
[    1.294474][    T1]         ...
[    1.294476][    T1] Call Trace:
[    1.294476][    T1] [<9000000003842aec>] fast_imageblit.isra.0+0x2ac/0x520
[    1.294480][    T1] [<900000000383da14>] soft_cursor+0x1b4/0x260
[    1.294483][    T1] [<900000000383d54c>] bit_cursor+0x34c/0x5e0
[    1.294485][    T1] [<900000000390a704>] hide_cursor+0x44/0x100
[    1.294490][    T1] [<900000000390c744>] vt_console_print+0x4a4/0x4e0
[    1.294494][    T1] [<9000000002df960c>] console_flush_all+0x1cc/0x500
[    1.294499][    T1] [<9000000002dfbdf0>] console_flush_on_panic+0x50/0x100
[    1.294503][    T1] [<9000000003fa5650>] panic+0x230/0x360
[    1.294508][    T1] [<9000000002d345f0>] die+0x170/0x180
[    1.294511][    T1] [<9000000003fcb548>] do_ade+0x68/0x80
[    1.294516][    T1] [<900000000558112c>] exception_handlers+0x112c/0x10000
[    1.294521][    T1] [<9000000003841a44>] bitfill_aligned+0xa4/0x120
[    1.294525][    T1] [<90000000038417cc>] cfb_fillrect+0x14c/0x320
[    1.294528][    T1] [<900000000383ca90>] bit_clear_margins+0xf0/0x140
[    1.294530][    T1] [<9000000003838590>] fbcon_prepare_logo+0x450/0x4e0
[    1.294533][    T1] [<900000000383a960>] fbcon_init+0x3e0/0x540
[    1.294536][    T1] [<90000000039090c4>] visual_init+0xc4/0x140
[    1.294539][    T1] [<900000000390cf24>] do_bind_con_driver.isra.0+0x204/0x460
[    1.294543][    T1] [<900000000390d1dc>] do_take_over_console+0x5c/0x80
[    1.294548][    T1] [<90000000038374ec>] do_fbcon_takeover+0x6c/0x100
[    1.294550][    T1] [<900000000383c078>] fbcon_fb_registered+0x138/0x1a0
[    1.294553][    T1] [<900000000382d0b0>] do_register_framebuffer+0x170/0x260
[    1.294556][    T1] [<900000000382d1d4>] register_framebuffer+0x34/0x60
[    1.294560][    T1] [<900000000384ef84>] efifb_probe+0x864/0x8c0
[    1.294563][    T1] [<90000000039e020c>] platform_probe+0x6c/0xe0
[    1.294567][    T1] [<90000000039dc568>] really_probe+0xc8/0x440
[    1.294569][    T1] [<90000000039dc970>] __driver_probe_device+0x90/0x1c0
[    1.294572][    T1] [<90000000039dcadc>] driver_probe_device+0x3c/0xe0
[    1.294575][    T1] [<90000000039dcc54>] __device_attach_driver+0xd4/0x1a0
[    1.294578][    T1] [<90000000039d99a0>] bus_for_each_drv+0xa0/0x120
[    1.294581][    T1] [<90000000039dd210>] __device_attach+0xb0/0x1e0
[    1.294583][    T1] [<90000000039daf34>] bus_probe_device+0xb4/0xe0
[    1.294586][    T1] [<90000000039d7584>] device_add+0x564/0x7e0
[    1.294590][    T1] [<90000000039dfa38>] platform_device_add+0x138/0x300
[    1.294593][    T1] [<9000000004026450>] sysfb_init+0x100/0x140
[    1.294597][    T1] [<9000000002d30cb0>] do_one_initcall+0x70/0x280
[    1.294600][    T1] [<9000000003fe1074>] do_initcalls+0x11c/0x168
[    1.294604][    T1] [<9000000003fe12bc>] kernel_init_freeable+0x188/0x1cc
[    1.294608][    T1] [<9000000003fce230>] kernel_init+0x28/0x138
[    1.294612][    T1] [<9000000002d31f08>] ret_from_kernel_thread+0xc/0xa4
[    1.294614][    T1] 
[    1.294615][    T1] Code: 24ffba10  001501bf  02c081ad <29bf81b0> 2a3ffd90  00449a10  0014ba10  00df0210  002cf610 
[    1.294622][    T1] 
[    1.294623][    T1] ---[ end trace 0000000000000000 ]---
[    1.294625][    T1] Kernel panic - not syncing: Fatal exception
[    1.294626][    T1] Kernel relocated by 0x2b10000
[    1.294627][    T1]  .text @ 0x9000000002d10000
[    1.294628][    T1]  .data @ 0x9000000004110000
[    1.294629][    T1]  .bss  @ 0x9000000005547200


Expected results:
虚拟机启动正常

Additional info:
1. 虚拟机内核版本为6.6.25-2_rc1.1.an23.loongarch64,使用debug版本QEMU_EFI.fd时,虚拟机启动正常
2. 虚拟机内核版本为6.6.25-2.1.an23.loongarch64,使用release版本QEMU_EFI.silent.fd时,虚拟机启动正常
Comment 1 lixianglai loongson_group 2024-06-05 14:17:11 UTC
使用内核最新代码编译内核,更换虚拟机内核后,问题不在
Comment 2 lixianglai loongson_group 2024-06-20 11:01:19 UTC
经过定位在debug 版本bios时,grub申请的内存空间没有清零,导致传入kernel的screen info参数错误,需要grub修改一下,在引导efi内核时不存在此问题,只有在引导elf内核时才会存在,
后面由liuxue@loongson.cn跟踪解决