Lines Matching refs:fpstate
36 extern void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate,
40 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf);
41 extern int copy_sigframe_from_user_to_xstate(struct fpstate *fpstate, const void __user *ubuf);
135 extern void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor);
137 static inline void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) { } in xfd_validate_state() argument
141 static inline void xfd_update_state(struct fpstate *fpstate) in xfd_update_state() argument
144 u64 xfd = fpstate->xfd; in xfd_update_state()
153 static inline void xfd_update_state(struct fpstate *fpstate) { } in xfd_update_state() argument
162 static inline void os_xsave(struct fpstate *fpstate) in os_xsave() argument
164 u64 mask = fpstate->xfeatures; in os_xsave()
170 xfd_validate_state(fpstate, mask, false); in os_xsave()
172 XSTATE_XSAVE(&fpstate->regs.xsave, lmask, hmask, err); in os_xsave()
183 static inline void os_xrstor(struct fpstate *fpstate, u64 mask) in os_xrstor() argument
188 xfd_validate_state(fpstate, mask, true); in os_xrstor()
189 XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask); in os_xrstor()
193 static inline void os_xrstor_supervisor(struct fpstate *fpstate) in os_xrstor_supervisor() argument
199 XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask); in os_xrstor_supervisor()
248 struct fpstate *fpstate = current->thread.fpu.fpstate; in xsave_to_user_sigframe() local
249 u64 mask = fpstate->user_xfeatures; in xsave_to_user_sigframe()
260 xfd_validate_state(fpstate, mask, false); in xsave_to_user_sigframe()
279 xfd_validate_state(current->thread.fpu.fpstate, mask, true); in xrstor_from_user_sigframe()
292 static inline int os_xrstor_safe(struct fpstate *fpstate, u64 mask) in os_xrstor_safe() argument
294 struct xregs_state *xstate = &fpstate->regs.xsave; in os_xrstor_safe()
300 xfd_update_state(fpstate); in os_xrstor_safe()