docs/devel/tcg-icount.rst | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
gen_io_start() no longer exists, and since commit 18a536f1f8d6
("accel/tcg: Always require can_do_io") I/O instructions end the
TB regardless of icount. Document translator_io_start() instead.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
docs/devel/tcg-icount.rst | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/docs/devel/tcg-icount.rst b/docs/devel/tcg-icount.rst
index a1dcd79e0fdd..6541d98e170d 100644
--- a/docs/devel/tcg-icount.rst
+++ b/docs/devel/tcg-icount.rst
@@ -73,16 +73,14 @@ system registers are the common examples here. These instructions have
to be handled by the individual translators which have the knowledge
of which operations are I/O operations.
-When the translator is handling an instruction of this kind:
-
-* it must call gen_io_start() if icount is enabled, at some
- point before the generation of the code which actually does
- the I/O, using a code fragment similar to:
+When the translator is handling an instruction of this kind, it must
+call translator_io_start() before generating the code which actually
+does the I/O:
.. code:: c
- if (tb_cflags(s->base.tb) & CF_USE_ICOUNT) {
- gen_io_start();
- }
+ translator_io_start(&s->base);
-* it must end the TB immediately after this instruction
+This makes the instruction the last one of the TB, whether or not
+icount is enabled, so that it executes with ``can_do_io`` set and,
+with icount, reads an exact clock.
--
2.55.0
On 11/26/2026 1:18 PM, Philippe Mathieu-Daudé wrote:
> gen_io_start() no longer exists, and since commit 18a536f1f8d6
> ("accel/tcg: Always require can_do_io") I/O instructions end the
> TB regardless of icount. Document translator_io_start() instead.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> ---
> docs/devel/tcg-icount.rst | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> On 26. Nov 2026, at 22:18, Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> wrote:
>
> gen_io_start() no longer exists, and since commit 18a536f1f8d6
> ("accel/tcg: Always require can_do_io") I/O instructions end the
> TB regardless of icount. Document translator_io_start() instead.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Mohamed Mediouni <mohamed.mediouni@linaro.org>
> ---
> docs/devel/tcg-icount.rst | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/docs/devel/tcg-icount.rst b/docs/devel/tcg-icount.rst
> index a1dcd79e0fdd..6541d98e170d 100644
> --- a/docs/devel/tcg-icount.rst
> +++ b/docs/devel/tcg-icount.rst
> @@ -73,16 +73,14 @@ system registers are the common examples here. These instructions have
> to be handled by the individual translators which have the knowledge
> of which operations are I/O operations.
>
> -When the translator is handling an instruction of this kind:
> -
> -* it must call gen_io_start() if icount is enabled, at some
> - point before the generation of the code which actually does
> - the I/O, using a code fragment similar to:
> +When the translator is handling an instruction of this kind, it must
> +call translator_io_start() before generating the code which actually
> +does the I/O:
>
> .. code:: c
>
> - if (tb_cflags(s->base.tb) & CF_USE_ICOUNT) {
> - gen_io_start();
> - }
> + translator_io_start(&s->base);
>
> -* it must end the TB immediately after this instruction
> +This makes the instruction the last one of the TB, whether or not
> +icount is enabled, so that it executes with ``can_do_io`` set and,
> +with icount, reads an exact clock.
> --
> 2.55.0
>
>
© 2016 - 2026 Red Hat, Inc.