Home
last modified time | relevance | path

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

/linux-6.6.21/arch/x86/include/asm/
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()
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
Dpgtable.h1623 u32 pkru = read_pkru(); in __pkru_allows_pkey() local
1625 if (!__pkru_allows_read(pkru, pkey)) in __pkru_allows_pkey()
1627 if (write && !__pkru_allows_write(pkru, pkey)) in __pkru_allows_pkey()
Dprocessor.h476 u32 pkru; member
Dsvm.h415 u32 pkru; member
Dkvm_host.h733 u32 pkru; member
/linux-6.6.21/arch/x86/kernel/fpu/
Dxstate.c1150 struct pkru_state pkru = {0}; in __copy_xstate_to_uabi_buf() local
1155 pkru.pkru = pkru_val; in __copy_xstate_to_uabi_buf()
1156 membuf_write(&to, &pkru, sizeof(pkru)); in __copy_xstate_to_uabi_buf()
1191 tsk->thread.pkru, copy_mode); in copy_xstate_to_uabi_buf()
1236 const void __user *ubuf, u32 *pkru) in copy_uabi_to_xstate() argument
1289 *pkru = xpkru->pkru; in copy_uabi_to_xstate()
1295 if (pkru) in copy_uabi_to_xstate()
1296 *pkru = 0; in copy_uabi_to_xstate()
1317 int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru) in copy_uabi_from_kernel_to_xstate() argument
1319 return copy_uabi_to_xstate(fpstate, kbuf, NULL, pkru); in copy_uabi_from_kernel_to_xstate()
[all …]
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()
Dxstate.h50 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru);
Dregset.c171 ret = copy_uabi_from_kernel_to_xstate(fpu->fpstate, kbuf ?: tmpbuf, &target->thread.pkru); in xstateregs_set()
/linux-6.6.21/arch/x86/kernel/
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()
Dprocess.c218 p->thread.pkru = pkru_get_init_value(); in copy_thread()
228 p->thread.pkru = read_pkru(); in copy_thread()
/linux-6.6.21/arch/x86/include/asm/fpu/
Dapi.h161 unsigned int size, u64 xfeatures, u32 pkru);
Dtypes.h253 u32 pkru; member
/linux-6.6.21/arch/x86/kvm/
Dmmu.h226 pkru_bits = (vcpu->arch.pkru >> (pte_pkey * 2)) & 3; in permission_fault()
Dx86.c1034 vcpu->arch.pkru != vcpu->arch.host_pkru && in kvm_load_guest_xsave_state()
1037 write_pkru(vcpu->arch.pkru); in kvm_load_guest_xsave_state()
1049 vcpu->arch.pkru = rdpkru(); in kvm_load_host_xsave_state()
1050 if (vcpu->arch.pkru != vcpu->arch.host_pkru) in kvm_load_host_xsave_state()
5411 supported_xcr0, vcpu->arch.pkru); in kvm_vcpu_ioctl_x86_get_xsave2()
5430 &vcpu->arch.pkru); in kvm_vcpu_ioctl_x86_set_xsave()
/linux-6.6.21/tools/testing/selftests/kvm/include/x86_64/
Dprocessor.h563 static inline void wrpkru(u32 pkru) in wrpkru() argument
567 : : "a" (pkru), "c"(0), "d"(0)); in wrpkru()
/linux-6.6.21/arch/x86/kvm/svm/
Dsev.c611 save->pkru = svm->vcpu.arch.pkru; in sev_es_sync_vmsa()
3101 hostsa->pkru = read_pkru(); in sev_es_prepare_switch_to_guest()
/linux-6.6.21/tools/arch/x86/kcpuid/
Dcpuid.csv250 0xD, 0, EAX, 9, pkru, PKRU state