|
From: | Pavel Dovgalyuk |
Subject: | Re: what are the requirements on target/ code for -icount to work correctly? |
Date: | Mon, 22 Jun 2020 10:50:24 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 22.06.2020 08:24, Max Filippov wrote:
On Fri, Jun 19, 2020 at 10:05 AM Peter Maydell <peter.maydell@linaro.org> wrote:I've just sent a patch that removes the target/arm gen_io_end() calls. I had a quick look at sparc, xtensa and ppc, but they were too complicated for a quick look to be sufficient :-)I've checked the xtensa translator. The only gen_io_end() is for opcodes that end TB when a full instruction is translated, because they can change active interrupt requests. So it can be removed. I'll send a patch. One instance of gen_io_start is for the rsr.ccount opcode that reads current cycle counter that translates to reading QEMU_CLOCK_VIRTUAL clock.
Right, this is documented by Alex in the new document recently sent into the mailing list:
7611429f-ec38-554d-3aec-e4a2f456a1ea@linaro.org/T/#mff14f2e3dc2cedd7cc6b1356985a0454e4772202">https://lore.kernel.org/qemu-devel/7611429f-ec38-554d-3aec-e4a2f456a1ea@linaro.org/T/#mff14f2e3dc2cedd7cc6b1356985a0454e4772202
Looks like this adds one more case to the following list:As I understand it, the definition of "I/O insn" is anything that can either: - affect the icount deadline (e.g. by setting or removing a QEMU_CLOCK_VIRTUAL timer) - interrupt the current translation block with cpu_loop_exit, cpu_restore_state or similar.
[Prev in Thread] | Current Thread | [Next in Thread] |