Richard Henderson <[email protected]> 于2025年9月23日周二 07:22写道: > > On 9/17/25 05:47, [email protected] wrote: > > From: Weiwei Li <[email protected]> > > > > The problem is triggered in following conditions: > > - thread 1: > > run spin loop(ended with a direct jump) like "0x0000006f, // jal zero, #0" > > - thread 2: > > do something, and then modify the loop code of thread 1 to nop isntruction, > > finally wait thread 1 exit. > > > > The loop tb which is patched to jump to itself, will not be updated in this case > > and will never exit. > > > > Signed-off-by: Weiwei Li <[email protected]> > > --- > > accel/tcg/cpu-exec.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > If there's a problem with 1 tb, there's also a problem with 2 tb like > > jal zero, #4 > jal zero, #-4 >
I tried this case. And it didn't have this problem. This problem seems only existed in single tb loop. > > But unlinking the tb should be part of invalidation, so I don't quite see where the > problem is. You need to expand on the description of the problem. > I think the problem is the single tb is always in use when the single tb is linked with itself, and it cannot be updated when we update the code。 Regards, Weiwei Li > > r~
