arch/arm/include/asm/thread_info.h
71
union fp_state fpstate __attribute__((aligned(8)));
arch/arm/kernel/asm-offsets.c
55
DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate));
arch/arm/kernel/asm-offsets.c
67
DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt));
arch/arm/kernel/process.c
226
memset(&thread->fpstate, 0, sizeof(union fp_state));
arch/arm/kernel/ptrace.c
301
return copy_to_user(ufp, &thread->fpstate.iwmmxt, IWMMXT_SIZE)
arch/arm/kernel/ptrace.c
315
return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE)
arch/arm/kernel/ptrace.c
576
return membuf_write(&to, &task_thread_info(target)->fpstate,
arch/arm/kernel/ptrace.c
588
&thread->fpstate,
arch/arm/nwfpe/fpa11.h
13
#define GET_FPA11() ((FPA11 *)(¤t_thread_info()->fpstate))
arch/arm/nwfpe/fpmodule.c
53
nwfpe_init_fpa(&thread->fpstate);
arch/m68k/include/asm/processor.h
129
unsigned char fpstate[FPSTATESIZE]; /* floating point state */
arch/m68k/kernel/asm-offsets.c
40
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
arch/m68k/kernel/process.c
185
asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory");
arch/m68k/kernel/process.c
187
if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) {
arch/m68k/kernel/process.c
210
asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0]));
arch/m68k/kernel/signal.c
335
unsigned char fpstate[FPCONTEXT_SIZE];
arch/m68k/kernel/signal.c
352
if (__get_user(*(long *)fpstate, (long __user *)&uc->uc_fpstate))
arch/m68k/kernel/signal.c
354
if (CPU_IS_060 ? fpstate[2] : fpstate[0]) {
arch/m68k/kernel/signal.c
356
context_size = fpstate[1];
arch/m68k/kernel/signal.c
359
(fpstate[0] != fpu_version))
arch/m68k/kernel/signal.c
374
if (!(fpstate[3] == 0x00 ||
arch/m68k/kernel/signal.c
375
fpstate[3] == 0x60 ||
arch/m68k/kernel/signal.c
376
fpstate[3] == 0xe0))
arch/m68k/kernel/signal.c
379
if (!(fpstate[3] == 0x00 ||
arch/m68k/kernel/signal.c
380
fpstate[3] == 0x05 ||
arch/m68k/kernel/signal.c
381
fpstate[3] == 0xe5))
arch/m68k/kernel/signal.c
410
__copy_from_user(fpstate + 4, (long __user *)&uc->uc_fpstate + 1,
arch/m68k/kernel/signal.c
415
__asm__ volatile ("frestore %0" : : "m" (*fpstate));
arch/m68k/kernel/signal.c
420
: : "m" (*fpstate));
arch/m68k/kernel/signal.c
486
unsigned char fpstate[FPCONTEXT_SIZE];
arch/m68k/kernel/signal.c
501
__asm__ volatile ("fsave %0" : : "m" (*fpstate) : "memory");
arch/m68k/kernel/signal.c
506
: : "m" (*fpstate) : "memory");
arch/m68k/kernel/signal.c
509
err |= __put_user(*(long *)fpstate, (long __user *)&uc->uc_fpstate);
arch/m68k/kernel/signal.c
510
if (CPU_IS_060 ? fpstate[2] : fpstate[0]) {
arch/m68k/kernel/signal.c
513
context_size = fpstate[1];
arch/m68k/kernel/signal.c
514
fpu_version = fpstate[0];
arch/m68k/kernel/signal.c
519
if (*(unsigned short *) fpstate == 0x1f38)
arch/m68k/kernel/signal.c
520
fpstate[0x38] |= 1 << 3;
arch/m68k/kernel/signal.c
547
err |= copy_to_user((long __user *)&uc->uc_fpstate + 1, fpstate + 4,
arch/x86/include/asm/fpu/api.h
134
extern void fpstate_clear_xstate_component(struct fpstate *fpstate, unsigned int xfeature);
arch/x86/include/asm/fpu/api.h
161
gfpu->fpstate->is_confidential = true;
arch/x86/include/asm/fpu/api.h
166
return gfpu->fpstate->is_confidential;
arch/x86/include/asm/fpu/signal.h
36
extern void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask);
arch/x86/include/asm/fpu/types.h
499
struct fpstate *fpstate;
arch/x86/include/asm/fpu/types.h
507
struct fpstate *__task_fpstate;
arch/x86/include/asm/fpu/types.h
531
struct fpstate __fpstate;
arch/x86/include/asm/fpu/types.h
561
struct fpstate *fpstate;
arch/x86/include/asm/sighandling.h
20
void __user **fpstate);
arch/x86/include/asm/trace/fpu.h
25
__entry->xfeatures = fpu->fpstate->regs.xsave.header.xfeatures;
arch/x86/include/asm/trace/fpu.h
26
__entry->xcomp_bv = fpu->fpstate->regs.xsave.header.xcomp_bv;
arch/x86/include/uapi/asm/sigcontext.h
193
struct _fpstate fpstate;
arch/x86/include/uapi/asm/sigcontext.h
230
__u32 fpstate; /* Zero when no FPU/extended context */
arch/x86/include/uapi/asm/sigcontext.h
273
__u64 fpstate; /* Zero when no FPU/extended context */
arch/x86/include/uapi/asm/sigcontext.h
320
struct _fpstate __user *fpstate;
arch/x86/include/uapi/asm/sigcontext.h
380
struct _fpstate __user *fpstate; /* Zero when no FPU context */
arch/x86/kernel/fpu/context.h
74
restore_fpregs_from_fpstate(fpu->fpstate, XFEATURE_MASK_FPSTATE);
arch/x86/kernel/fpu/core.c
123
if (fpu->fpstate->regs.xsave.header.xfeatures & AVX512_TRACKING_MASK)
arch/x86/kernel/fpu/core.c
144
os_xsave(fpu->fpstate);
arch/x86/kernel/fpu/core.c
150
fxsave(&fpu->fpstate->regs.fxsave);
arch/x86/kernel/fpu/core.c
158
asm volatile("fnsave %[fp]; fwait" : [fp] "=m" (fpu->fpstate->regs.fsave));
arch/x86/kernel/fpu/core.c
159
frstor(&fpu->fpstate->regs.fsave);
arch/x86/kernel/fpu/core.c
162
void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask)
arch/x86/kernel/fpu/core.c
175
: : [addr] "m" (*fpstate));
arch/x86/kernel/fpu/core.c
194
xfd_update_state(fpstate);
arch/x86/kernel/fpu/core.c
207
os_xrstor(fpstate, mask);
arch/x86/kernel/fpu/core.c
210
fxrstor(&fpstate->regs.fxsave);
arch/x86/kernel/fpu/core.c
212
frstor(&fpstate->regs.fsave);
arch/x86/kernel/fpu/core.c
222
static void __fpstate_reset(struct fpstate *fpstate);
arch/x86/kernel/fpu/core.c
244
struct fpstate *fpstate;
arch/x86/kernel/fpu/core.c
247
size = guest_default_cfg.size + ALIGN(offsetof(struct fpstate, regs), 64);
arch/x86/kernel/fpu/core.c
249
fpstate = vzalloc(size);
arch/x86/kernel/fpu/core.c
250
if (!fpstate)
arch/x86/kernel/fpu/core.c
254
fpstate->is_valloc = true;
arch/x86/kernel/fpu/core.c
255
fpstate->is_guest = true;
arch/x86/kernel/fpu/core.c
257
__fpstate_reset(fpstate);
arch/x86/kernel/fpu/core.c
258
fpstate_init_user(fpstate);
arch/x86/kernel/fpu/core.c
260
gfpu->fpstate = fpstate;
arch/x86/kernel/fpu/core.c
284
struct fpstate *fpstate = gfpu->fpstate;
arch/x86/kernel/fpu/core.c
286
if (!fpstate)
arch/x86/kernel/fpu/core.c
289
if (WARN_ON_ONCE(!fpstate->is_valloc || !fpstate->is_guest || fpstate->in_use))
arch/x86/kernel/fpu/core.c
292
gfpu->fpstate = NULL;
arch/x86/kernel/fpu/core.c
293
vfree(fpstate);
arch/x86/kernel/fpu/core.c
322
struct fpstate *fpstate = guest_fpu->fpstate;
arch/x86/kernel/fpu/core.c
339
fpstate->regs.xsave.header.xfeatures &= ~xfd;
arch/x86/kernel/fpu/core.c
341
fpstate->xfd = xfd;
arch/x86/kernel/fpu/core.c
342
if (fpstate->in_use)
arch/x86/kernel/fpu/core.c
343
xfd_update_state(fpstate);
arch/x86/kernel/fpu/core.c
363
struct fpstate *fpstate = x86_task_fpu(current)->fpstate;
arch/x86/kernel/fpu/core.c
367
rdmsrq(MSR_IA32_XFD, fpstate->xfd);
arch/x86/kernel/fpu/core.c
368
__this_cpu_write(xfd_state, fpstate->xfd);
arch/x86/kernel/fpu/core.c
376
struct fpstate *guest_fps = guest_fpu->fpstate;
arch/x86/kernel/fpu/core.c
378
struct fpstate *cur_fps = fpu->fpstate;
arch/x86/kernel/fpu/core.c
387
fpu->fpstate = guest_fps;
arch/x86/kernel/fpu/core.c
391
fpu->fpstate = fpu->__task_fpstate;
arch/x86/kernel/fpu/core.c
395
cur_fps = fpu->fpstate;
arch/x86/kernel/fpu/core.c
418
struct fpstate *kstate = gfpu->fpstate;
arch/x86/kernel/fpu/core.c
437
struct fpstate *kstate = gfpu->fpstate;
arch/x86/kernel/fpu/core.c
47
struct fpstate init_fpstate __ro_after_init;
arch/x86/kernel/fpu/core.c
537
static inline void fpstate_init_fxstate(struct fpstate *fpstate)
arch/x86/kernel/fpu/core.c
539
fpstate->regs.fxsave.cwd = 0x37f;
arch/x86/kernel/fpu/core.c
540
fpstate->regs.fxsave.mxcsr = MXCSR_DEFAULT;
arch/x86/kernel/fpu/core.c
546
static inline void fpstate_init_fstate(struct fpstate *fpstate)
arch/x86/kernel/fpu/core.c
548
fpstate->regs.fsave.cwd = 0xffff037fu;
arch/x86/kernel/fpu/core.c
549
fpstate->regs.fsave.swd = 0xffff0000u;
arch/x86/kernel/fpu/core.c
550
fpstate->regs.fsave.twd = 0xffffffffu;
arch/x86/kernel/fpu/core.c
551
fpstate->regs.fsave.fos = 0xffff0000u;
arch/x86/kernel/fpu/core.c
559
void fpstate_init_user(struct fpstate *fpstate)
arch/x86/kernel/fpu/core.c
561
xstate_init_xcomp_bv(&fpstate->regs.xsave, fpstate->xfeatures);
arch/x86/kernel/fpu/core.c
564
fpstate_init_fxstate(fpstate);
arch/x86/kernel/fpu/core.c
566
fpstate_init_fstate(fpstate);
arch/x86/kernel/fpu/core.c
569
static void __fpstate_reset(struct fpstate *fpstate)
arch/x86/kernel/fpu/core.c
581
if (fpstate->is_guest) {
arch/x86/kernel/fpu/core.c
582
fpstate->size = guest_default_cfg.size;
arch/x86/kernel/fpu/core.c
583
fpstate->xfeatures = guest_default_cfg.features;
arch/x86/kernel/fpu/core.c
584
fpstate->xfd = 0;
arch/x86/kernel/fpu/core.c
586
fpstate->size = fpu_kernel_cfg.default_size;
arch/x86/kernel/fpu/core.c
587
fpstate->xfeatures = fpu_kernel_cfg.default_features;
arch/x86/kernel/fpu/core.c
588
fpstate->xfd = init_fpstate.xfd;
arch/x86/kernel/fpu/core.c
591
fpstate->user_size = fpu_user_cfg.default_size;
arch/x86/kernel/fpu/core.c
592
fpstate->user_xfeatures = fpu_user_cfg.default_features;
arch/x86/kernel/fpu/core.c
598
fpu->fpstate = &fpu->__fpstate;
arch/x86/kernel/fpu/core.c
599
__fpstate_reset(fpu->fpstate);
arch/x86/kernel/fpu/core.c
638
xstate = get_xsave_addr(&x86_task_fpu(dst)->fpstate->regs.xsave,
arch/x86/kernel/fpu/core.c
690
memcpy(&dst_fpu->fpstate->regs, &init_fpstate.regs,
arch/x86/kernel/fpu/core.c
723
dst_fpu->fpstate->regs.xsave.header.xfeatures &= ~XFEATURE_MASK_PASID;
arch/x86/kernel/fpu/core.c
821
memcpy(&fpu->fpstate->regs, &init_fpstate.regs, init_fpstate_copy_size());
arch/x86/kernel/fpu/core.c
848
os_xrstor_supervisor(fpu->fpstate);
arch/x86/kernel/fpu/core.c
851
xfd_update_state(fpu->fpstate);
arch/x86/kernel/fpu/core.c
950
cwd = fpu->fpstate->regs.fxsave.cwd;
arch/x86/kernel/fpu/core.c
951
swd = fpu->fpstate->regs.fxsave.swd;
arch/x86/kernel/fpu/core.c
953
cwd = (unsigned short)fpu->fpstate->regs.fsave.cwd;
arch/x86/kernel/fpu/core.c
954
swd = (unsigned short)fpu->fpstate->regs.fsave.swd;
arch/x86/kernel/fpu/core.c
968
mxcsr = fpu->fpstate->regs.fxsave.mxcsr;
arch/x86/kernel/fpu/internal.h
25
extern void fpstate_init_user(struct fpstate *fpstate);
arch/x86/kernel/fpu/internal.h
5
extern struct fpstate init_fpstate;
arch/x86/kernel/fpu/regset.c
116
memcpy(&fpu->fpstate->regs.fxsave, &newstate, sizeof(newstate));
arch/x86/kernel/fpu/regset.c
121
memset(&fpu->fpstate->regs.fxsave.xmm_space[8*4], 0, 8 * 16);
arch/x86/kernel/fpu/regset.c
125
fpu->fpstate->regs.xsave.header.xfeatures |= XFEATURE_MASK_FPSSE;
arch/x86/kernel/fpu/regset.c
171
ret = copy_uabi_from_kernel_to_xstate(fpu->fpstate, kbuf ?: tmpbuf, &target->thread.pkru);
arch/x86/kernel/fpu/regset.c
198
cetregs = get_xsave_addr(&fpu->fpstate->regs.xsave, XFEATURE_CET_USER);
arch/x86/kernel/fpu/regset.c
218
struct xregs_state *xsave = &fpu->fpstate->regs.xsave;
arch/x86/kernel/fpu/regset.c
371
__convert_from_fxsr(env, tsk, &x86_task_fpu(tsk)->fpstate->regs.fxsave);
arch/x86/kernel/fpu/regset.c
414
return membuf_write(&to, &fpu->fpstate->regs.fsave,
arch/x86/kernel/fpu/regset.c
425
fx = &fpu->fpstate->regs.fxsave;
arch/x86/kernel/fpu/regset.c
454
convert_to_fxsr(&fpu->fpstate->regs.fxsave, &env);
arch/x86/kernel/fpu/regset.c
456
memcpy(&fpu->fpstate->regs.fsave, &env, sizeof(env));
arch/x86/kernel/fpu/regset.c
463
fpu->fpstate->regs.xsave.header.xfeatures |= XFEATURE_MASK_FP;
arch/x86/kernel/fpu/regset.c
82
return membuf_write(&to, &fpu->fpstate->regs.fxsave,
arch/x86/kernel/fpu/regset.c
83
sizeof(fpu->fpstate->regs.fxsave));
arch/x86/kernel/fpu/signal.c
106
struct fpstate *fpstate)
arch/x86/kernel/fpu/signal.c
109
sw_bytes->extended_size = fpstate->user_size + FP_XSTATE_MAGIC2_SIZE;
arch/x86/kernel/fpu/signal.c
110
sw_bytes->xfeatures = fpstate->user_xfeatures;
arch/x86/kernel/fpu/signal.c
111
sw_bytes->xstate_size = fpstate->user_size;
arch/x86/kernel/fpu/signal.c
118
struct fpstate *fpstate)
arch/x86/kernel/fpu/signal.c
125
save_sw_bytes(&sw_bytes, ia32_frame, fpstate);
arch/x86/kernel/fpu/signal.c
132
(__u32 __user *)(buf + fpstate->user_size));
arch/x86/kernel/fpu/signal.c
183
struct fpstate *fpstate = x86_task_fpu(tsk)->fpstate;
arch/x86/kernel/fpu/signal.c
228
if (!__clear_user(buf_fx, fpstate->user_size))
arch/x86/kernel/fpu/signal.c
237
if (use_fxsr() && !save_xstate_epilog(buf_fx, ia32_fxstate, fpstate))
arch/x86/kernel/fpu/signal.c
275
xrestore &= fpu->fpstate->user_xfeatures;
arch/x86/kernel/fpu/signal.c
279
xfd_update_state(fpu->fpstate);
arch/x86/kernel/fpu/signal.c
281
ret = __restore_fpregs_from_user(buf, fpu->fpstate->user_xfeatures,
arch/x86/kernel/fpu/signal.c
305
if (!fault_in_readable(buf, fpu->fpstate->user_size))
arch/x86/kernel/fpu/signal.c
32
void __user *fpstate = fxbuf;
arch/x86/kernel/fpu/signal.c
320
os_xrstor_supervisor(fpu->fpstate);
arch/x86/kernel/fpu/signal.c
379
os_xsave(fpu->fpstate);
arch/x86/kernel/fpu/signal.c
386
fpregs = &fpu->fpstate->regs;
arch/x86/kernel/fpu/signal.c
41
fx_sw->xstate_size > x86_task_fpu(current)->fpstate->user_size ||
arch/x86/kernel/fpu/signal.c
426
success = !os_xrstor_safe(fpu->fpstate,
arch/x86/kernel/fpu/signal.c
439
static inline unsigned int xstate_sigframe_size(struct fpstate *fpstate)
arch/x86/kernel/fpu/signal.c
441
unsigned int size = fpstate->user_size;
arch/x86/kernel/fpu/signal.c
462
size = xstate_sigframe_size(fpu->fpstate);
arch/x86/kernel/fpu/signal.c
498
unsigned long frame_size = xstate_sigframe_size(x86_task_fpu(current)->fpstate);
arch/x86/kernel/fpu/signal.c
51
if (__get_user(magic2, (__u32 __user *)(fpstate + fx_sw->xstate_size)))
arch/x86/kernel/fpu/signal.c
72
struct xregs_state *xsave = &x86_task_fpu(tsk)->fpstate->regs.xsave;
arch/x86/kernel/fpu/signal.c
78
fxsave(&x86_task_fpu(tsk)->fpstate->regs.fxsave);
arch/x86/kernel/fpu/xstate.c
1144
void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate,
arch/x86/kernel/fpu/xstate.c
1150
struct xregs_state *xsave = &fpstate->regs.xsave;
arch/x86/kernel/fpu/xstate.c
1169
header.xfeatures &= fpstate->user_xfeatures & xfeatures;
arch/x86/kernel/fpu/xstate.c
1271
__copy_xstate_to_uabi_buf(to, x86_task_fpu(tsk)->fpstate,
arch/x86/kernel/fpu/xstate.c
1272
x86_task_fpu(tsk)->fpstate->user_xfeatures,
arch/x86/kernel/fpu/xstate.c
1317
static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf,
arch/x86/kernel/fpu/xstate.c
1320
struct xregs_state *xsave = &fpstate->regs.xsave;
arch/x86/kernel/fpu/xstate.c
1330
if (validate_user_xstate_header(&hdr, fpstate))
arch/x86/kernel/fpu/xstate.c
1399
int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru)
arch/x86/kernel/fpu/xstate.c
1401
return copy_uabi_to_xstate(fpstate, kbuf, NULL, pkru);
arch/x86/kernel/fpu/xstate.c
1412
return copy_uabi_to_xstate(x86_task_fpu(tsk)->fpstate, NULL, ubuf, &tsk->thread.pkru);
arch/x86/kernel/fpu/xstate.c
1478
void fpstate_clear_xstate_component(struct fpstate *fpstate, unsigned int xfeature)
arch/x86/kernel/fpu/xstate.c
1480
void *addr = get_xsave_addr(&fpstate->regs.xsave, xfeature);
arch/x86/kernel/fpu/xstate.c
1495
static bool xstate_op_valid(struct fpstate *fpstate, u64 mask, bool rstor)
arch/x86/kernel/fpu/xstate.c
1499
if (fpstate->xfd == xfd)
arch/x86/kernel/fpu/xstate.c
1506
if (fpstate->xfd == x86_task_fpu(current)->fpstate->xfd)
arch/x86/kernel/fpu/xstate.c
1514
if (fpstate == &init_fpstate)
arch/x86/kernel/fpu/xstate.c
1532
mask &= ~fpstate->xfeatures;
arch/x86/kernel/fpu/xstate.c
1541
void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor)
arch/x86/kernel/fpu/xstate.c
1543
WARN_ON_ONCE(!xstate_op_valid(fpstate, mask, rstor));
arch/x86/kernel/fpu/xstate.c
1561
if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate)
arch/x86/kernel/fpu/xstate.c
1562
vfree(fpu->fpstate);
arch/x86/kernel/fpu/xstate.c
1584
struct fpstate *curfps, *newfps = NULL;
arch/x86/kernel/fpu/xstate.c
1588
fpsize = ksize + ALIGN(offsetof(struct fpstate, regs), 64);
arch/x86/kernel/fpu/xstate.c
1601
curfps = guest_fpu ? guest_fpu->fpstate : fpu->fpstate;
arch/x86/kernel/fpu/xstate.c
1604
in_use = fpu->fpstate == curfps;
arch/x86/kernel/fpu/xstate.c
1631
guest_fpu->fpstate = newfps;
arch/x86/kernel/fpu/xstate.c
1634
fpu->fpstate = newfps;
arch/x86/kernel/fpu/xstate.c
1636
fpu->fpstate = newfps;
arch/x86/kernel/fpu/xstate.c
1640
xfd_update_state(fpu->fpstate);
arch/x86/kernel/fpu/xstate.c
432
struct fpstate *fpstate)
arch/x86/kernel/fpu/xstate.c
435
if (hdr->xfeatures & ~fpstate->user_xfeatures)
arch/x86/kernel/fpu/xstate.c
990
wrmsrq(MSR_IA32_XFD, x86_task_fpu(current)->fpstate->xfd);
arch/x86/kernel/fpu/xstate.h
177
extern void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor);
arch/x86/kernel/fpu/xstate.h
179
static inline void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) { }
arch/x86/kernel/fpu/xstate.h
189
static inline void xfd_update_state(struct fpstate *fpstate)
arch/x86/kernel/fpu/xstate.h
192
u64 xfd = fpstate->xfd;
arch/x86/kernel/fpu/xstate.h
203
static inline void xfd_update_state(struct fpstate *fpstate) { }
arch/x86/kernel/fpu/xstate.h
216
static inline void os_xsave(struct fpstate *fpstate)
arch/x86/kernel/fpu/xstate.h
218
u64 mask = fpstate->xfeatures;
arch/x86/kernel/fpu/xstate.h
224
xfd_validate_state(fpstate, mask, false);
arch/x86/kernel/fpu/xstate.h
226
XSTATE_XSAVE(&fpstate->regs.xsave, lmask, hmask, err);
arch/x86/kernel/fpu/xstate.h
237
static inline void os_xrstor(struct fpstate *fpstate, u64 mask)
arch/x86/kernel/fpu/xstate.h
242
xfd_validate_state(fpstate, mask, true);
arch/x86/kernel/fpu/xstate.h
243
XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask);
arch/x86/kernel/fpu/xstate.h
247
static inline void os_xrstor_supervisor(struct fpstate *fpstate)
arch/x86/kernel/fpu/xstate.h
253
XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask);
arch/x86/kernel/fpu/xstate.h
302
struct fpstate *fpstate = x86_task_fpu(current)->fpstate;
arch/x86/kernel/fpu/xstate.h
303
u64 mask = fpstate->user_xfeatures;
arch/x86/kernel/fpu/xstate.h
314
xfd_validate_state(fpstate, mask, false);
arch/x86/kernel/fpu/xstate.h
336
xfd_validate_state(x86_task_fpu(current)->fpstate, mask, true);
arch/x86/kernel/fpu/xstate.h
349
static inline int os_xrstor_safe(struct fpstate *fpstate, u64 mask)
arch/x86/kernel/fpu/xstate.h
351
struct xregs_state *xstate = &fpstate->regs.xsave;
arch/x86/kernel/fpu/xstate.h
357
xfd_update_state(fpstate);
arch/x86/kernel/fpu/xstate.h
46
extern void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate,
arch/x86/kernel/fpu/xstate.h
51
extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru);
arch/x86/kernel/signal.c
133
*fpstate = (void __user *)sp;
arch/x86/kernel/signal.c
163
if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size, pkru)) {
arch/x86/kernel/signal.c
95
void __user **fpstate)
arch/x86/kernel/signal_32.c
146
return fpu__restore_sig(compat_ptr(sc.fpstate), 1);
arch/x86/kernel/signal_32.c
212
void __user *fpstate,
arch/x86/kernel/signal_32.c
242
unsafe_put_user(ptr_to_compat(fpstate), &sc->fpstate, Efault);
arch/x86/kernel/signal_64.c
128
unsafe_put_user(fpstate, (unsigned long __user *)&sc->fpstate, Efault);
arch/x86/kernel/signal_64.c
95
return fpu__restore_sig((void __user *)sc.fpstate, 0);
arch/x86/kernel/signal_64.c
99
__unsafe_setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
arch/x86/kvm/svm/sev.c
1027
xsave = &vcpu->arch.guest_fpu.fpstate->regs.xsave;
arch/x86/kvm/vmx/vmx.c
5364
return vcpu->arch.guest_fpu.fpstate->xfd &&
arch/x86/kvm/x86.c
11908
if (KVM_BUG_ON(vcpu->arch.guest_fpu.fpstate->in_use, vcpu->kvm))
arch/x86/kvm/x86.c
11919
if (KVM_BUG_ON(!vcpu->arch.guest_fpu.fpstate->in_use, vcpu->kvm))
arch/x86/kvm/x86.c
12650
fxsave = &vcpu->arch.guest_fpu.fpstate->regs.fxsave;
arch/x86/kvm/x86.c
12673
fxsave = &vcpu->arch.guest_fpu.fpstate->regs.fxsave;
arch/x86/kvm/x86.c
12917
struct fpstate *fpstate = vcpu->arch.guest_fpu.fpstate;
arch/x86/kvm/x86.c
12926
if (!init_event || !fpstate)
arch/x86/kvm/x86.c
12952
WARN_ON_ONCE(vcpu->wants_to_run != fpstate->in_use);
arch/x86/kvm/x86.c
12953
fpu_in_use = fpstate->in_use;
arch/x86/kvm/x86.c
12957
fpstate_clear_xstate_component(fpstate, i);
arch/x86/kvm/x86.c
3858
KVM_BUG_ON(!vcpu->arch.guest_fpu.fpstate->in_use, vcpu->kvm);
arch/x86/kvm/x86.c
4614
msr_info->data = vcpu->arch.guest_fpu.fpstate->xfd;
arch/x86/kvm/x86.c
5836
xstate->xsave.header.xfeatures &= ~vcpu->arch.guest_fpu.fpstate->xfd;
arch/x86/um/os-Linux/mcontext.c
95
struct _fpstate_64 fpstate;
arch/x86/um/signal.c
101
(void __user *)sc.fpstate);
arch/x86/um/signal.c
158
sc.fpstate = (unsigned long)to_fp;
arch/x86/um/signal.c
172
__put_user(X86_FXSR_MAGIC, &to_fp->fpstate.magic);
arch/x86/um/signal.c
193
if (host_fp_size <= sizeof(to_fp64->fpstate))
arch/x86/um/signal.c
200
&to_fp64->fpstate.sw_reserved.extended_size);
arch/x86/um/signal.c
203
&to_fp64->fpstate.sw_reserved.extended_size);
arch/x86/um/signal.c
205
__put_user(host_fp_size, &to_fp64->fpstate.sw_reserved.xstate_size);
arch/x86/um/signal.c
207
__put_user(FP_XSTATE_MAGIC1, &to_fp64->fpstate.sw_reserved.magic1);
arch/x86/um/signal.c
24
struct _fpstate_64 fpstate;
arch/x86/um/signal.c
406
err |= __put_user(fp_to, &frame->uc.uc_mcontext.fpstate);
arch/x86/um/signal.c
85
from_fp64 = ((void __user *)sc.fpstate) +
arch/x86/um/signal.c
88
from_fp64 = (void __user *)sc.fpstate;
tools/testing/selftests/x86/corrupt_xstate_header.c
36
uint8_t *fpstate = (uint8_t *)uc->uc_mcontext.fpregs;
tools/testing/selftests/x86/corrupt_xstate_header.c
37
uint64_t *xfeatures = (uint64_t *)(fpstate + 512);