Comment 5 for bug 1754038

Revision history for this message
Antoine (acalando) wrote :

Ok I spent more time trying to identify the commits giving problem.

So before 8d04fb5, qemu is executing the binary as expected:

setup timer
cnt 007cccca -- 7
cnt 006998a2 -- 7
cnt 00566479 -- 7
cnt 0043304f -- 7
cnt 002ffc26 -- 7
cnt 001cc7fd -- 7
cnt 000993d5 -- 7
SysTick
cnt 00865f9c -- 10007
cnt 00732b5c -- 7
cnt 005ff733 -- 7
cnt 004cc30a -- 7
[...]

Then, after this commit "tcg: drop global lock during TCG code execution":

https://git.qemu.org/?p=qemu.git;a=commit;h=8d04fb55dec381bc5105cb47f29d918e579e8cbd

things start to look bad (but not the same way I first ran into):

setup timer
SysTick
cnt 00000000 -- 10007
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 008ff3e3 -- 7
cnt 007cbfba -- 7
cnt 00698b92 -- 7
cnt 00565768 -- 7
cnt 0043233f -- 7
cnt 002fef16 -- 7
cnt 001cbaed -- 7
cnt 000986c5 -- 7
SysTick
cnt 0086528b -- 10007
cnt 00731e4c -- 7
cnt 005fea23 -- 7
cnt 004cb5fa -- 7
cnt 003981d1 -- 7
[...]

Then, not long after, this commit changes a little bit the prb "icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread"

https://git.qemu.org/?p=qemu.git;a=commit;h=6b8f0187a4d7c263e356302f8d308655372a4b5b

Output then looks like:

setup timer
cnt 007cccca -- 7
cnt 006998a2 -- 7
cnt 00566479 -- 7
cnt 0043304f -- 7
cnt 002ffc26 -- 7
cnt 001cc7fd -- 7
cnt 000993d5 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
cnt 00000000 -- 7
SysTick
cnt 000986e0 -- 10007
SysTick
cnt 00865290 -- 10007
cnt 00731e51 -- 7
cnt 005fea27 -- 7
[...]

... and it seems this very problem has been occurring up to now.

I am here using the binary attached, with this command line:

qemu-system-arm -M lm3s6965evb -nographic -kernel hello.bin -serial file:$(tty) -icount 4 -cpu cortex-m4

And with these build options:

./configure --target-list=arm-softmmu --disable-slirp --disable-blobs --disable-docs --disable-guest-agent --disable-gnutls --disable-nettle --disable-gcrypt --disable-sdl --disable-gtk --disable-vnc --disable-virtfs --disable-xen --disable-brlapi --disable-curl --disable-bluez --disable-kvm --disable-rdma --disable-vde --disable-netmap --disable-linux-aio --disable-cap-ng --disable-attr --disable-vhost-net --disable-spice --disable-rbd --disable-libiscsi --disable-libnfs --disable-smartcard --disable-libusb --disable-usb-redir --disable-lzo --disable-snappy --disable-bzip2 --disable-seccomp --disable-glusterfs --disable-tpm --disable-libssh2 --disable-numa --disable-tcmalloc --disable-jemalloc --disable-opengl --disable-virglrenderer --disable-xfsctl --disable-qom-cast-debug --disable-pie --extra-cflags=-mtune=native

Note that, to prevent MTTCG/icount error, we must modify configure for the arm target with:

     mttcg="no"