/openbmc/linux/arch/x86/include/asm/ |
H A D | pkru.h | 19 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 D | special_insns.h | 83 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 D | pgtable.h | 1607 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 D | processor.h | 491 u32 pkru; member
|
H A D | svm.h | 415 u32 pkru; member
|
/openbmc/qemu/target/i386/ |
H A D | xsave_helper.c | 125 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 D | machine.c | 1026 return env->pkru != 0; in pkru_needed() 1035 VMSTATE_UINT32(env.pkru, X86CPU),
|
H A D | cpu.h | 1607 uint32_t pkru; member 1854 uint32_t pkru; member
|
/openbmc/linux/arch/x86/kernel/fpu/ |
H A D | xstate.c | 1154 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 D | signal.c | 159 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 D | core.c | 372 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 D | xstate.h | 50 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru);
|
H A D | regset.c | 171 ret = copy_uabi_from_kernel_to_xstate(fpu->fpstate, kbuf ?: tmpbuf, &target->thread.pkru); in xstateregs_set()
|
/openbmc/qemu/target/i386/tcg/ |
H A D | misc_helper.c | 113 return env->pkru; in helper_rdpkru() 127 env->pkru = val; in helper_wrpkru()
|
H A D | fpu_helper.c | 2665 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 D | signal.h | 32 extern bool copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size, u32 pkru);
|
H A D | api.h | 161 unsigned int size, u64 xfeatures, u32 pkru);
|
H A D | types.h | 253 u32 pkru; member
|
/openbmc/linux/arch/x86/kernel/ |
H A D | signal.c | 86 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 D | process_64.c | 357 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 D | process.c | 218 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 D | mmu.h | 226 pkru_bits = (vcpu->arch.pkru >> (pte_pkey * 2)) & 3; in permission_fault()
|
/openbmc/linux/tools/testing/selftests/kvm/include/x86_64/ |
H A D | processor.h | 563 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 D | excp_helper.c | 389 pkr = pg_mode & PG_MODE_PKE ? env->pkru : 0; in mmu_translate()
|
/openbmc/linux/arch/x86/kvm/svm/ |
H A D | sev.c | 618 save->pkru = svm->vcpu.arch.pkru; in sev_es_sync_vmsa() 3145 hostsa->pkru = read_pkru(); in sev_es_prepare_switch_to_guest()
|