Lines Matching refs:fpstate
400 struct fpstate *fpstate) in validate_user_xstate_header() argument
403 if (hdr->xfeatures & ~fpstate->user_xfeatures) in validate_user_xstate_header()
918 wrmsrl(MSR_IA32_XFD, current->thread.fpu.fpstate->xfd); in fpu__resume_cpu()
1058 void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, in __copy_xstate_to_uabi_buf() argument
1063 struct xregs_state *xsave = &fpstate->regs.xsave; in __copy_xstate_to_uabi_buf()
1083 header.xfeatures &= fpstate->user_xfeatures; in __copy_xstate_to_uabi_buf()
1126 mask = fpstate->user_xfeatures; in __copy_xstate_to_uabi_buf()
1186 __copy_xstate_to_uabi_buf(to, tsk->thread.fpu.fpstate, in copy_xstate_to_uabi_buf()
1203 static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf, in copy_uabi_to_xstate() argument
1206 struct xregs_state *xsave = &fpstate->regs.xsave; in copy_uabi_to_xstate()
1216 if (validate_user_xstate_header(&hdr, fpstate)) in copy_uabi_to_xstate()
1271 int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf) in copy_uabi_from_kernel_to_xstate() argument
1273 return copy_uabi_to_xstate(fpstate, kbuf, NULL); in copy_uabi_from_kernel_to_xstate()
1281 int copy_sigframe_from_user_to_xstate(struct fpstate *fpstate, in copy_sigframe_from_user_to_xstate() argument
1284 return copy_uabi_to_xstate(fpstate, NULL, ubuf); in copy_sigframe_from_user_to_xstate()
1350 void fpstate_clear_xstate_component(struct fpstate *fps, unsigned int xfeature) in fpstate_clear_xstate_component()
1367 static bool xstate_op_valid(struct fpstate *fpstate, u64 mask, bool rstor) in xstate_op_valid() argument
1371 if (fpstate->xfd == xfd) in xstate_op_valid()
1378 if (fpstate->xfd == current->thread.fpu.fpstate->xfd) in xstate_op_valid()
1386 if (fpstate == &init_fpstate) in xstate_op_valid()
1404 mask &= ~fpstate->xfeatures; in xstate_op_valid()
1413 void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) in xfd_validate_state() argument
1415 WARN_ON_ONCE(!xstate_op_valid(fpstate, mask, rstor)); in xfd_validate_state()
1433 if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate) in arch_initcall()
1434 vfree(fpu->fpstate); in arch_initcall()
1456 struct fpstate *curfps, *newfps = NULL; in fpstate_realloc()
1460 fpsize = ksize + ALIGN(offsetof(struct fpstate, regs), 64); in fpstate_realloc()
1473 curfps = guest_fpu ? guest_fpu->fpstate : fpu->fpstate; in fpstate_realloc()
1476 in_use = fpu->fpstate == curfps; in fpstate_realloc()
1506 guest_fpu->fpstate = newfps; in fpstate_realloc()
1509 fpu->fpstate = newfps; in fpstate_realloc()
1511 fpu->fpstate = newfps; in fpstate_realloc()
1515 xfd_update_state(fpu->fpstate); in fpstate_realloc()