On 19.09.2023 17:01, Andrew Cooper wrote:
> The patch adding check_ist_exit() neglected to consider reset_stack_and_jump()
> leaving C and entering one of the Xen exit paths.  The value in %r12 is stale,
> and depending on compiler decisions may not be 0.

And it may also not be zero that we would be looking for. I think this
wants expressing differently. The value in %r12 simply doesn't survive,
and this has at best little to do with compiler decisions.

> This shows up in Gitlab CI for the Clang build:
> 
>   https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/5112783827
> 
> and in OSSTest for GCC 8:
> 
>   
> http://logs.test-lab.xenproject.org/osstest/logs/183045/test-amd64-amd64-xl-qemuu-debianhvm-amd64/serial-pinot0.log
> 
> There's no straightforward way to reconstruct the IST-exit-ness on the
> exit-to-guest path after a context switch.  For now, we only need IST-exit on
> the return-to-Xen path.
> 
> Fixes: 21bdc25b05a0 ("x86/entry: Track the IST-ness of an entry for the exit 
> paths")
> Signed-off-by: Andrew Cooper <[email protected]>

Code change itself:
Reviewed-by: Jan Beulich <[email protected]>

Jan

Reply via email to