Illegal instruction crash of QEMU on Jetson Nano
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Richard Henderson |
Bug Description
I have a jetson nano (arm64 SBC) and I want to check the native emulation performance of Raspbian Buster. I used the info available here:
https:/
I have Xubuntut 20.04 with KVM enabled kernel running on the Jetson Nano
However QEMU crashes with "Illegal Instruction" during kernel boot. I have a built latest QEMU from sources with following configuration
./configure --prefix=/usr/local --target-
qemu-system-aarch64 --version
QEMU emulator version 5.2.50 (v5.2.0-
When I run as follows:
../build/
-append "rw earlyprintk loglevel=8 console=
-dtb ./bcm2710-
-sd /media/
-kernel ./kernel8.img
-m 1G -smp 4 -serial stdio -usb -device usb-mouse -device usb-kbd
I get :
[ 74.994834] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[ 76.281274] systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
Illegal instruction (core dumped)
When I use GDB I see this:
Thread 8 "qemu-system-aar" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7fad7f9ba0 (LWP 28037)]
0x0000007f888ac690 in code_gen_buffer ()
(gdb) bt
#0 0x0000007f888ac690 in code_gen_buffer ()
#1 0x0000005555d7c038 in cpu_tb_exec (tb_exit=, itb=, cpu=0x7fb4502c40)
at ../accel/
#2 cpu_loop_exec_tb (tb_exit=, last_tb=, tb=, cpu=0x7fb4502c40)
at ../accel/
#3 cpu_exec (cpu=cpu@
..
I have just two questions:
Is this a problem with QEMU or is there anything specific build or options I need to use. Any specific version of QEMU should be used ?
Why is TCG used as the accelerator when KVM is present. Is it possible and how to use KVM ?
If I enabled the KVM then I get this error:
../build/
WARNING: Image format was not specified for '/media/
Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-
Thanks a lot.
Changed in qemu: | |
status: | New → Confirmed |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
Can you use gdb to display what the instruction that provoked the SIGILL is ? ("disas $pc-32,$pc+32" or similar should do it).
Re "Why is TCG used as the accelerator when KVM is present?", the answer is that only certain board types and CPU types work with KVM. The simple answer is "only the 'virt' board works with KVM". Other boards generally use a CPU type or CPU features which KVM does not support and so TCG is the only choice. It's a QEMU bug that we assert() rather than printing a helpful error message (which we will probably fix for 6.0.)