Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\regset.c Create Date:2022-07-28 07:49:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:xstateregs_set

Proto:int xstateregs_set(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, const void *kbuf, const void __user *ubuf)

Type:int

Parameter:

TypeParameterName
struct task_struct *target
const struct user_regset *regset
unsigned intpos
unsigned intcount
const void *kbuf
const void __user *ubuf
117  fpu = Floating point and extended processor state
121  If Not boot_cpu_has(XSAVE/XRSTOR/XSETBV/XGETBV instructions ) Then Return -ENODEV
127  If pos != 0 || count < fpu_user_xstate_size Then Return -EFAULT
130  xsave = xsave
132  This function must be called before we write a task's fpstate.* Invalidate any cached FPU registers.* After this function call, after registers in the fpstate are* modified and the child task has woken up, the child task will
134  If using_compacted_format() Then
135  If kbuf Then ret = copy_kernel_to_xstate(xsave, kbuf)
137  Else ret = copy_user_to_xstate(xsave, ubuf)
139  Else
140  ret = user_regset_copyin( & pos, & count, & kbuf, & ubuf, xsave, 0, - 1)
141  If Not ret Then ret = Validate an xstate header supplied by userspace (ptrace or sigreturn)
148  MXCSR Register State &= Boot time FPU feature detection code:
153  If ret Then fpstate_init( & @state:* In-memory copy of all FPU registers that we save/restore* over context switches. If the task is using the FPU then* the registers in the FPU are more recent than this state* copy. If the task context-switches away then they get)
156  Return ret