Skip to content

Linux kernel boot on x86 full system (FS) with --cpu-type=DerivO3CPU fails with: "Kernel panic - not syncing: Attempted to kill the idle task!" #2

Open
@cirosantilli2

Description

@cirosantilli2

https://github.com/cirosantilli/linux-kernel-module-cheat/tree/96ee0246ce52012644dd18cf360e64c49016fb7f#benchmark-linux-kernel-boot gem5 at 2a9573f5942b5416fb0570cf5cb6cdecba733392
run command:

./run -a x86_64 -E 'm5 exit' -g -- --cpu-type=DerivO3CPU --caches --l2cache --l1d_size=1024kB --l1i_size=1024kB --l2_size=1024kB --l3_size=1024kB

Boot works if I remove --cpu-type=DerivO3CPU.

Possible same on mailing list: https://www.mail-archive.com/gem5-users@gem5.org/msg14062.html but DeriveO3CPU not mentioned so I'm not sure.

Full gem5 command:

M5_PATH='/data/git/linux-kernel-module-cheat/gem5/gem5-system' '/data/git/linux-kernel-module-cheat/gem5/gem5/build/X86/gem5.opt'  '/data/git/linux-kernel-module-cheat/gem5/gem5/configs/example/fs.py' --command-l
ine='earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda nokaslr norandmaps printk.devkmsg=on printk.time=y' --disk-image='/data/git/linux-kernel-module-cheat/buildroot/output.x86_64-gem5~/images/rootfs.ext
2' --kernel='/data/git/linux-kernel-module-cheat/buildroot/output.x86_64-gem5~/build/linux-custom/vmlinux' --num-cpus=1  --caches --l1d_size=1024 --l2cache --l2_size=1024 --l3_size=1024 --cpu-type=DerivO3CPU

dmesg excerpt:

0.127522 <6>[    0.024000] Spectre V2 : Vulnerable: Minimal generic ASM retpoline                        
23.696755 <6>[    0.028910] Freeing SMP alternatives memory: 24K                                                                                                                                                   1.008942 <1>[    0.029069] BUG: unable to handle kernel NULL pointer dereference at 00000000000002b4     
0.108844 <1>[    0.029130] IP: text_poke_early+0x4b/0x70                                                 
0.084271 <6>[    0.029161] PGD 0 P4D 0              
0.086973 <4>[    0.029186] Oops: 0000 [#1] SMP PTI                                                       
0.075675 <4>[    0.029213] Modules linked in:                                                            
0.118854 <4>[    0.029242] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.16.0 #52                          
0.085922 <4>[    0.029285] Hardware name:  , BIOS  06/08/2008                                            
0.104662 <4>[    0.029320] RIP: 0010:text_poke_early+0x4b/0x70                                           
0.110513 <4>[    0.029354] RSP: 0000:ffffffff81e00007 EFLAGS: 0000026c                                   
0.123625 <4>[    0.029394] RAX: 0000000000000001 RBX: 000000000000026c RCX: 0000000066669d57             
0.121920 <4>[    0.029444] RDX: 0000000000000007 RSI: ffffffff81e03db2 RDI: 000000000000026c             
0.118559 <4>[    0.029494] RBP: ffffffff8101ed65 R08: 0000000090669066 R09: 000000000000009d             
0.118119 <4>[    0.029543] R10: 0000000000000001 R11: 20504d5320676e69 R12: ffffffff81e03db2             
0.118198 <4>[    0.029592] R13: 0000000000000007 R14: 0000000000000000 R15: 00000000ffffffff             
0.131240 <4>[    0.029642] FS:  0000000000000000(0000) GS:ffff88000fc00000(0000) knlGS:0000000000000000
0.109616 <4>[    0.029697] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
0.123105 <4>[    0.029739] CR2: 00000000000002b4 CR3: 0000000001e0a000 CR4: 00000000000006b0
0.122851 <4>[    0.029790] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
0.118367 <4>[    0.029839] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000000
0.065272 <4>[    0.029889] Call Trace:
1.402723 <4>[    0.029990] Code: 66 90 66 66 90 e8 d6 a0 0c 00 4c 89 ea 4c 89 e6 48 89 ef e8 b8 b5 5b 00 f6 c7 02 74 19 e8 0e 9d 0c 00 48 89 df 57 9d 66 66 90 66 <90> 5b 48 89 e8 5d 41 5c 41 5d c3 48 89 df ff 14
 25 c8 8b e2 81
0.121340 <1>[    0.030156] RIP: text_poke_early+0x4b/0x70 RSP: ffffffff81e00007
0.075736 <4>[    0.030198] CR2: 00000000000002b4
0.105172 <4>[    0.030229] ---[ end trace 6d53c1c17a70e53c ]---
0.116871 <0>[    0.030265] Kernel panic - not syncing: Attempted to kill the idle task!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedConfirmed by a moderator of this repo.x86

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions