qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is a


From: Alex Bennée
Subject: Re: [PATCH v4 4/4] meson: Warn when TCI is selected but TCG backend is available
Date: Wed, 27 Jan 2021 21:47:50 +0000
User-agent: mu4e 1.5.7; emacs 28.0.50

Stefan Weil <sw@weilnetz.de> writes:

> Am 27.01.21 um 20:52 schrieb Alex Bennée:
>
>> For example - debian-buster (arm64) running ffmpeg:
>>
>>    alex.bennee@8cd150a4b35d:~/lsrc/qemu.git/builds/all.tci$ ./qemu-aarch64 
>> /usr/bin/ffmpeg -i theora.mkv theora.webm
>>    TODO ../../tcg/tci.c:882: tcg_qemu_tb_exec()
>>    ../../tcg/tci.c:882: tcg fatal error
>>    qemu: uncaught target signal 11 (Segmentation fault) - core dumped
>>    Segmentation fault (core dumped)
>
>
> Thanks. All I tried to say is that I prefer to replace those TODO 
> statements by working code as soon as there was a case which triggers 
> them. Most of those TODO statements are very easy to implement, so 
> anyone can add them when he/she detects a missing one. If I get 
> information about a scenario which triggers a missing TODO, I'll fix 
> that of course. I just don't want to add that missing code blindly.

Your just going to end up playing wack-a-mole:

  TODO ../../tcg/tci.c:620: tcg_qemu_tb_exec()me=00:00:00.00 bitrate=N/A speed= 
  0x
  ../../tcg/tci.c:620: tcg fatal error
  qemu: uncaught target signal 11 (Segmentation fault) - core dumped
  Segmentation fault (core dumped)

> Using `make check-tcg` helped finding and fixing one of them, future 
> improved CI checks can find more, and so can examples like the one 
> above. The error message tci.c:882 is INDEX_op_ld8s_i64 
> (https://github.com/qemu/qemu/blob/master/tcg/tci.c#L882). The missing 
> code is nearly identical to the existing code for INDEX_op_ld8u_i64, but 
> with *(int8_t *) instead of *(uint8_t *), so maybe you can try that and 
> confirm whether it fixes the reported problem. Otherwise I'll try to 
> reproduce it with any mkv file.

ffmpeg is a good application for working out the SIMD code because it
features quite a lot of optimised code for each architecture.

> I recently tried running tesseract with qemu-x86_64 because I had 
> expected that it might trigger some unimplemented TCG opcodes.

qemu-x86-64 is a poor choice as a relatively under maintained front-end
doesn't emulate a particularly new CPU or take advantage of the new TCG
features. ARM64 is pretty good because the default cpu for linux-user is
CPU max which a) enables all ISA features we have and b) exposes them
fairly easily to guest detection routines which probe feature registers.

> Instead 
> it showed a general problem for native TCG: qemu-x86_64 allocates too 
> much memory for tesseract and gets killed by the Linux kernel OOM
> handler.

Do you have a command line? That sounds like something that should be
fixed.

>
> Regards,
>
> Stefan


-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]