Fix cpu_unlink_tb race
If a signal hit after the env->exit_request check but before cpu_exec updated env->current_tb, cpu_unlink_tb called from the signal hander will not unlink the current TB. This may leave us stuck in a guest loop if no further unlink is invoked. Fix this by reordering current_tb update and exit_request check, additionally enforcing the correct order via a compiler barrier. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NMarcelo Tosatti <mtosatti@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
Showing
想要评论请 注册 或 登录