Lines Matching refs:fpstate
46 extern void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate,
51 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru);
177 extern void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor);
179 static inline void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) { } in xfd_validate_state() argument
189 static inline void xfd_update_state(struct fpstate *fpstate) in xfd_update_state() argument
192 u64 xfd = fpstate->xfd; in xfd_update_state()
203 static inline void xfd_update_state(struct fpstate *fpstate) { } in xfd_update_state() argument
216 static inline void os_xsave(struct fpstate *fpstate) in os_xsave() argument
218 u64 mask = fpstate->xfeatures; in os_xsave()
224 xfd_validate_state(fpstate, mask, false); in os_xsave()
226 XSTATE_XSAVE(&fpstate->regs.xsave, lmask, hmask, err); in os_xsave()
237 static inline void os_xrstor(struct fpstate *fpstate, u64 mask) in os_xrstor() argument
242 xfd_validate_state(fpstate, mask, true); in os_xrstor()
243 XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask); in os_xrstor()
247 static inline void os_xrstor_supervisor(struct fpstate *fpstate) in os_xrstor_supervisor() argument
253 XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask); in os_xrstor_supervisor()
302 struct fpstate *fpstate = x86_task_fpu(current)->fpstate; in xsave_to_user_sigframe() local
303 u64 mask = fpstate->user_xfeatures; in xsave_to_user_sigframe()
314 xfd_validate_state(fpstate, mask, false); in xsave_to_user_sigframe()
336 xfd_validate_state(x86_task_fpu(current)->fpstate, mask, true); in xrstor_from_user_sigframe()
349 static inline int os_xrstor_safe(struct fpstate *fpstate, u64 mask) in os_xrstor_safe() argument
351 struct xregs_state *xstate = &fpstate->regs.xsave; in os_xrstor_safe()
357 xfd_update_state(fpstate); in os_xrstor_safe()