Lines Matching refs:fpstate
431 struct fpstate *fpstate) in validate_user_xstate_header() argument
434 if (hdr->xfeatures & ~fpstate->user_xfeatures) in validate_user_xstate_header()
989 wrmsrq(MSR_IA32_XFD, x86_task_fpu(current)->fpstate->xfd); in fpu__resume_cpu()
1144 void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, in __copy_xstate_to_uabi_buf() argument
1150 struct xregs_state *xsave = &fpstate->regs.xsave; in __copy_xstate_to_uabi_buf()
1169 header.xfeatures &= fpstate->user_xfeatures & xfeatures; in __copy_xstate_to_uabi_buf()
1271 __copy_xstate_to_uabi_buf(to, x86_task_fpu(tsk)->fpstate, in copy_xstate_to_uabi_buf()
1272 x86_task_fpu(tsk)->fpstate->user_xfeatures, in copy_xstate_to_uabi_buf()
1317 static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf, in copy_uabi_to_xstate() argument
1320 struct xregs_state *xsave = &fpstate->regs.xsave; in copy_uabi_to_xstate()
1330 if (validate_user_xstate_header(&hdr, fpstate)) in copy_uabi_to_xstate()
1399 int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru) in copy_uabi_from_kernel_to_xstate() argument
1401 return copy_uabi_to_xstate(fpstate, kbuf, NULL, pkru); in copy_uabi_from_kernel_to_xstate()
1412 return copy_uabi_to_xstate(x86_task_fpu(tsk)->fpstate, NULL, ubuf, &tsk->thread.pkru); in copy_sigframe_from_user_to_xstate()
1478 void fpstate_clear_xstate_component(struct fpstate *fpstate, unsigned int xfeature) in fpstate_clear_xstate_component() argument
1480 void *addr = get_xsave_addr(&fpstate->regs.xsave, xfeature); in fpstate_clear_xstate_component()
1495 static bool xstate_op_valid(struct fpstate *fpstate, u64 mask, bool rstor) in xstate_op_valid() argument
1499 if (fpstate->xfd == xfd) in xstate_op_valid()
1506 if (fpstate->xfd == x86_task_fpu(current)->fpstate->xfd) in xstate_op_valid()
1514 if (fpstate == &init_fpstate) in xstate_op_valid()
1532 mask &= ~fpstate->xfeatures; in xstate_op_valid()
1541 void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) in xfd_validate_state() argument
1543 WARN_ON_ONCE(!xstate_op_valid(fpstate, mask, rstor)); in xfd_validate_state()
1561 if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate) in arch_initcall()
1562 vfree(fpu->fpstate); in arch_initcall()
1584 struct fpstate *curfps, *newfps = NULL; in fpstate_realloc()
1588 fpsize = ksize + ALIGN(offsetof(struct fpstate, regs), 64); in fpstate_realloc()
1601 curfps = guest_fpu ? guest_fpu->fpstate : fpu->fpstate; in fpstate_realloc()
1604 in_use = fpu->fpstate == curfps; in fpstate_realloc()
1631 guest_fpu->fpstate = newfps; in fpstate_realloc()
1634 fpu->fpstate = newfps; in fpstate_realloc()
1636 fpu->fpstate = newfps; in fpstate_realloc()
1640 xfd_update_state(fpu->fpstate); in fpstate_realloc()