Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Ilya Leoshkevich
On Thu, 2025-01-16 at 15:41 +, Peter Maydell wrote: > On Thu, 16 Jan 2025 at 15:40, Alex Bennée > wrote: > > > > Richard Henderson writes: > > > > > On 1/16/25 07:06, Ilya Leoshkevich wrote: > > > > On Thu, 2025-01-16 at 06:54 -0800, Richard Henderson wrote: > > > > > On 1/15/25 15:20, Ilya

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Peter Maydell
On Thu, 16 Jan 2025 at 15:40, Alex Bennée wrote: > > Richard Henderson writes: > > > On 1/16/25 07:06, Ilya Leoshkevich wrote: > >> On Thu, 2025-01-16 at 06:54 -0800, Richard Henderson wrote: > >>> On 1/15/25 15:20, Ilya Leoshkevich wrote: > Currently single-insn TBs created from I/O memory

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Alex Bennée
Richard Henderson writes: > On 1/16/25 07:06, Ilya Leoshkevich wrote: >> On Thu, 2025-01-16 at 06:54 -0800, Richard Henderson wrote: >>> On 1/15/25 15:20, Ilya Leoshkevich wrote: Currently single-insn TBs created from I/O memory are not added to region_trees. Therefore, when they genera

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Richard Henderson
On 1/16/25 07:06, Ilya Leoshkevich wrote: On Thu, 2025-01-16 at 06:54 -0800, Richard Henderson wrote: On 1/15/25 15:20, Ilya Leoshkevich wrote: Currently single-insn TBs created from I/O memory are not added to region_trees. Therefore, when they generate exceptions, they are not handled by cpu_

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Philippe Mathieu-Daudé
On 16/1/25 16:09, Alex Bennée wrote: Peter Maydell writes: On Thu, 16 Jan 2025 at 11:48, Ilya Leoshkevich wrote: On Thu, 2025-01-16 at 11:06 +, Peter Maydell wrote: The original reported problem here seems to me like it's a problem with whatever target's frontend code this is. This is

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Alex Bennée
Peter Maydell writes: > On Thu, 16 Jan 2025 at 11:48, Ilya Leoshkevich wrote: >> >> On Thu, 2025-01-16 at 11:06 +, Peter Maydell wrote: >> > The original reported problem here seems to me like it's a >> > problem with whatever target's frontend code this is. >> > This is a single instruction

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Ilya Leoshkevich
On Thu, 2025-01-16 at 06:54 -0800, Richard Henderson wrote: > On 1/15/25 15:20, Ilya Leoshkevich wrote: > > Currently single-insn TBs created from I/O memory are not added to > > region_trees. Therefore, when they generate exceptions, they are > > not > > handled by cpu_restore_state_from_tb(). For

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Richard Henderson
On 1/15/25 15:20, Ilya Leoshkevich wrote: Currently single-insn TBs created from I/O memory are not added to region_trees. Therefore, when they generate exceptions, they are not handled by cpu_restore_state_from_tb(). For x86 this is not a problem, because x86_restore_state_to_opc() only restores

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Peter Maydell
On Thu, 16 Jan 2025 at 11:48, Ilya Leoshkevich wrote: > > On Thu, 2025-01-16 at 11:06 +, Peter Maydell wrote: > > The original reported problem here seems to me like it's a > > problem with whatever target's frontend code this is. > > This is a single instruction TB, so either: > > * the gene

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Ilya Leoshkevich
On Thu, 2025-01-16 at 11:06 +, Peter Maydell wrote: > On Thu, 16 Jan 2025 at 10:52, Alex Bennée > wrote: > > > > Ilya Leoshkevich writes: > > > > > On Wed, 2025-01-15 at 16:08 -0800, Richard Henderson wrote: > > > > On 1/15/25 15:20, Ilya Leoshkevich wrote: > > > > > Currently single-insn T

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Peter Maydell
On Thu, 16 Jan 2025 at 10:52, Alex Bennée wrote: > > Ilya Leoshkevich writes: > > > On Wed, 2025-01-15 at 16:08 -0800, Richard Henderson wrote: > >> On 1/15/25 15:20, Ilya Leoshkevich wrote: > >> > Currently single-insn TBs created from I/O memory are not added to > >> > region_trees. Therefore,

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Alex Bennée
Ilya Leoshkevich writes: > On Wed, 2025-01-15 at 16:08 -0800, Richard Henderson wrote: >> On 1/15/25 15:20, Ilya Leoshkevich wrote: >> > Currently single-insn TBs created from I/O memory are not added to >> > region_trees. Therefore, when they generate exceptions, they are >> > not >> > handled b

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-16 Thread Ilya Leoshkevich
On Wed, 2025-01-15 at 16:08 -0800, Richard Henderson wrote: > On 1/15/25 15:20, Ilya Leoshkevich wrote: > > Currently single-insn TBs created from I/O memory are not added to > > region_trees. Therefore, when they generate exceptions, they are > > not > > handled by cpu_restore_state_from_tb(). For

Re: [PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-15 Thread Richard Henderson
On 1/15/25 15:20, Ilya Leoshkevich wrote: Currently single-insn TBs created from I/O memory are not added to region_trees. Therefore, when they generate exceptions, they are not handled by cpu_restore_state_from_tb(). For x86 this is not a problem, because x86_restore_state_to_opc() only restores

[PATCH] accel/tcg: Call tcg_tb_insert() for one-insn TBs

2025-01-15 Thread Ilya Leoshkevich
Currently single-insn TBs created from I/O memory are not added to region_trees. Therefore, when they generate exceptions, they are not handled by cpu_restore_state_from_tb(). For x86 this is not a problem, because x86_restore_state_to_opc() only restores pc and cc, which are already correct. Howev