On Fri Nov 22 16:35:35 2024 +0000, Jinoh Kang wrote:
Oh, if we're *completely* getting rid of `gs30` hack and following the same pattern as wrfsbase/movfs, then no handlers are confused and we're fine. Thanks for pointing that out. Sorry for confusion.
Ah I see, the key is "As long as you do it at the same place as the Linux case it should work fine". Right now in `__wine_syscall_dispatcher_return` I'm resetting GSBASE much earlier than the Linux %fs is set, since the `SYSCALL_HAVE_XSAVE` case accesses %gs. Maybe the FP/xstate restore could be moved below the `%rsp > frame` line? Or `xstate_features_mask` could be stored in the syscall frame?