From: "Alex Bennée" <alex.bennee@linaro.org>
To: Mikhail Tyutin <m.tyutin@yadro.com>
Cc: <qemu-devel@nongnu.org>, <richard.henderson@linaro.org>,
<pbonzini@redhat.com>
Subject: Re: [PATCH] accel/tcg: Expose translation block flags to plugins
Date: Tue, 12 Dec 2023 12:23:19 +0000 [thread overview]
Message-ID: <87edfrd2yw.fsf@draig.linaro.org> (raw)
In-Reply-To: <20231122121655.20818-1-m.tyutin@yadro.com> (Mikhail Tyutin's message of "Wed, 22 Nov 2023 15:16:55 +0300")
Mikhail Tyutin <m.tyutin@yadro.com> writes:
> In system mode emulation, some of translation blocks could be
> interrupted on memory I/O operation. That leads to artificial
> construction of another translation block that contains memory
> operation only. If TCG plugin is not aware of that TB kind, it
> attempts to insert execution callbacks either on translation
> block or instruction, which is silently ignored.
That was the intention - the instrumented instructions have already been
executed. The only thing that matters now is the memory access:
/*
* Exit the loop and potentially generate a new TB executing the
* just the I/O insns. We also limit instrumentation to memory
* operations only (which execute after completion) so we don't
* double instrument the instruction.
*/
cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | n;
> As the result
> it leads to potentially inconsistent processing of execution and
> memory callbacks by the plugin.
> Exposing appropriate translation block flag allows plugins to
> handle "memory only" blocks in appropriate way.
We don't want to expose internal details to the plugin. It shouldn't
need to care.
Do you have a test case where you missed counting the execution of the
instruction?
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2023-12-12 12:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 12:16 [PATCH] accel/tcg: Expose translation block flags to plugins Mikhail Tyutin
2023-12-12 12:23 ` Alex Bennée [this message]
2023-12-14 10:37 ` Mikhail Tyutin
2023-12-15 11:39 ` Alex Bennée
2023-12-12 12:43 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edfrd2yw.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=m.tyutin@yadro.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).