Home
last modified time | relevance | path

Searched refs:pkru (Results 1 – 25 of 29) sorted by relevance

12

/openbmc/linux/arch/x86/include/asm/
H A Dpkru.h19 static inline bool __pkru_allows_read(u32 pkru, u16 pkey) in __pkru_allows_read() argument
22 return !(pkru & (PKRU_AD_BIT << pkru_pkey_bits)); in __pkru_allows_read()
25 static inline bool __pkru_allows_write(u32 pkru, u16 pkey) in __pkru_allows_write() argument
32 return !(pkru & ((PKRU_AD_BIT|PKRU_WD_BIT) << pkru_pkey_bits)); in __pkru_allows_write()
42 static inline void write_pkru(u32 pkru) in write_pkru() argument
50 if (pkru != rdpkru()) in write_pkru()
51 wrpkru(pkru); in write_pkru()
H A Dspecial_insns.h83 u32 edx, pkru; in rdpkru() local
90 : "=a" (pkru), "=d" (edx) in rdpkru()
92 return pkru; in rdpkru()
95 static inline void wrpkru(u32 pkru) in wrpkru() argument
104 : : "a" (pkru), "c"(ecx), "d"(edx)); in wrpkru()
113 static inline void wrpkru(u32 pkru) in wrpkru() argument
H A Dpgtable.h1607 u32 pkru = read_pkru(); in __pkru_allows_pkey() local
1609 if (!__pkru_allows_read(pkru, pkey)) in __pkru_allows_pkey()
1611 if (write && !__pkru_allows_write(pkru, pkey)) in __pkru_allows_pkey()
H A Dprocessor.h491 u32 pkru; member
H A Dsvm.h415 u32 pkru; member
/openbmc/qemu/target/i386/
H A Dxsave_helper.c125 XSavePKRU *pkru = buf + e->offset; in x86_cpu_xsave_all_areas() local
127 memcpy(pkru, &env->pkru, sizeof(env->pkru)); in x86_cpu_xsave_all_areas()
259 const XSavePKRU *pkru; in x86_cpu_xrstor_all_areas() local
261 pkru = buf + e->offset; in x86_cpu_xrstor_all_areas()
262 memcpy(&env->pkru, pkru, sizeof(env->pkru)); in x86_cpu_xrstor_all_areas()
H A Dmachine.c1026 return env->pkru != 0; in pkru_needed()
1035 VMSTATE_UINT32(env.pkru, X86CPU),
H A Dcpu.h1607 uint32_t pkru; member
1854 uint32_t pkru; member
/openbmc/linux/arch/x86/kernel/fpu/
H A Dxstate.c1154 struct pkru_state pkru = {0}; in __copy_xstate_to_uabi_buf() local
1159 pkru.pkru = pkru_val; in __copy_xstate_to_uabi_buf()
1160 membuf_write(&to, &pkru, sizeof(pkru)); in __copy_xstate_to_uabi_buf()
1195 tsk->thread.pkru, copy_mode); in copy_xstate_to_uabi_buf()
1240 const void __user *ubuf, u32 *pkru) in copy_uabi_to_xstate() argument
1293 *pkru = xpkru->pkru; in copy_uabi_to_xstate()
1299 if (pkru) in copy_uabi_to_xstate()
1300 *pkru = 0; in copy_uabi_to_xstate()
1321 int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru) in copy_uabi_from_kernel_to_xstate() argument
1323 return copy_uabi_to_xstate(fpstate, kbuf, NULL, pkru); in copy_uabi_from_kernel_to_xstate()
[all …]
H A Dsignal.c159 static inline int copy_fpregs_to_sigframe(struct xregs_state __user *buf, u32 pkru) in copy_fpregs_to_sigframe() argument
188 bool copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int size, u32 pkru) in copy_fpstate_to_sigframe() argument
231 ret = copy_fpregs_to_sigframe(buf_fx, pkru); in copy_fpstate_to_sigframe()
H A Dcore.c372 unsigned int size, u64 xfeatures, u32 pkru) in fpu_copy_guest_fpstate_to_uabi() argument
379 __copy_xstate_to_uabi_buf(mb, kstate, xfeatures, pkru, in fpu_copy_guest_fpstate_to_uabi()
H A Dxstate.h50 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru);
H A Dregset.c171 ret = copy_uabi_from_kernel_to_xstate(fpu->fpstate, kbuf ?: tmpbuf, &target->thread.pkru); in xstateregs_set()
/openbmc/qemu/target/i386/tcg/
H A Dmisc_helper.c113 return env->pkru; in helper_rdpkru()
127 env->pkru = val; in helper_wrpkru()
H A Dfpu_helper.c2665 access_stq(ac, ptr, ac->env->pkru); in do_xsave_pkru()
2914 ac->env->pkru = access_ldq(ac, ptr); in do_xrstor_pkru()
3020 uint64_t old_pkru = env->pkru; in do_xrstor()
3024 env->pkru = 0; in do_xrstor()
3026 if (env->pkru != old_pkru) { in do_xrstor()
/openbmc/linux/arch/x86/include/asm/fpu/
H A Dsignal.h32 extern bool copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size, u32 pkru);
H A Dapi.h161 unsigned int size, u64 xfeatures, u32 pkru);
H A Dtypes.h253 u32 pkru; member
/openbmc/linux/arch/x86/kernel/
H A Dsignal.c86 u32 pkru = read_pkru(); in get_sigframe() local
142 if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size, pkru)) in get_sigframe()
H A Dprocess_64.c357 prev->pkru = rdpkru(); in x86_pkru_load()
363 if (prev->pkru != next->pkru) in x86_pkru_load()
364 wrpkru(next->pkru); in x86_pkru_load()
H A Dprocess.c218 p->thread.pkru = pkru_get_init_value(); in copy_thread()
228 p->thread.pkru = read_pkru(); in copy_thread()
/openbmc/linux/arch/x86/kvm/
H A Dmmu.h226 pkru_bits = (vcpu->arch.pkru >> (pte_pkey * 2)) & 3; in permission_fault()
/openbmc/linux/tools/testing/selftests/kvm/include/x86_64/
H A Dprocessor.h563 static inline void wrpkru(u32 pkru) in wrpkru() argument
567 : : "a" (pkru), "c"(0), "d"(0)); in wrpkru()
/openbmc/qemu/target/i386/tcg/sysemu/
H A Dexcp_helper.c389 pkr = pg_mode & PG_MODE_PKE ? env->pkru : 0; in mmu_translate()
/openbmc/linux/arch/x86/kvm/svm/
H A Dsev.c618 save->pkru = svm->vcpu.arch.pkru; in sev_es_sync_vmsa()
3145 hostsa->pkru = read_pkru(); in sev_es_prepare_switch_to_guest()

12