panda
panda copied to clipboard
Fix deadlock with tap/tun devices for arm guests
Can confirm this works for the target where we first saw the bug. There appears to be an issue with the barebox minimal test case (with or without tap device):
/out/panda-taphang/build/arm-softmmu/panda-system-arm -M vexpress-a9 -nographic -no-reboot -monitor telnet::4443,server,nowait -kernel ./images/barebox-vexpress-ca9.img -m 1024m
audio: Could not init `oss' audio driver
barebox 2022.10.0 #1 Wed Oct 19 23:03:50 UTC 2022
Board: V2P-CA9
panda-system-arm: /out/panda-taphang/memory.c:918: memory_region_transaction_commit: Assertion `qemu_mutex_iothread_locked()' failed.
Aborted (core dumped)
Just a quick comment in case others run into this issue. The systems that were deadlocking were Linux kernels that somehow entered a race condition in QEMU during guest execution of the calibrate_delay
kernel function. A hack to get around this has been to specify a loops per jiffy from a successful boot (e.g., without a tap device) on the kernel command line (e.g., lpj=43648
). Your mileage may vary.