On 12/2/21 11:32 PM, Pengfei Xu wrote: > +void populate_xstate_regs(void) > +{ > + set_fpu_reg(); > + set_avx2_ymm(); > + set_avx512_opmask(); > + set_pkru_xstate(); > +} Pengfei, as I mentioned several times, XMM and YMM registers are not preserved across function calls. This only works by chance. The compiler is free to clobber them at basically any time between when they are populated and the XSAVE happens.