Home
last modified time | relevance | path

Searched refs:amr (Results 1 – 14 of 14) sorted by relevance

/arch/powerpc/mm/book3s64/
Dpkeys.c324 thread->amr = read_amr(); in thread_pkey_regs_save()
334 if (old_thread->amr != new_thread->amr) in thread_pkey_regs_restore()
335 write_amr(new_thread->amr); in thread_pkey_regs_restore()
345 thread->amr = default_amr; in thread_pkey_regs_init()
396 u64 amr; in pkey_access_permitted() local
402 amr = read_amr(); in pkey_access_permitted()
404 return !(amr & (AMR_WR_BIT << pkey_shift)); in pkey_access_permitted()
406 return !(amr & (AMR_RD_BIT << pkey_shift)); in pkey_access_permitted()
/arch/powerpc/include/asm/book3s/64/
Dkup-radix.h75 static inline void kuap_restore_amr(struct pt_regs *regs, unsigned long amr) in kuap_restore_amr() argument
77 if (mmu_has_feature(MMU_FTR_RADIX_KUAP) && unlikely(regs->kuap != amr)) { in kuap_restore_amr()
91 unsigned long amr = mfspr(SPRN_AMR); in kuap_get_and_check_amr() local
93 WARN_ON_ONCE(amr != AMR_KUAP_BLOCKED); in kuap_get_and_check_amr()
94 return amr; in kuap_get_and_check_amr()
148 static inline void kuap_restore_amr(struct pt_regs *regs, unsigned long amr) { } in kuap_restore_amr() argument
/arch/powerpc/kernel/
Dsyscall_64.c344 unsigned long amr; in interrupt_exit_kernel_prepare() local
351 amr = kuap_get_and_check_amr(); in interrupt_exit_kernel_prepare()
403 kuap_restore_amr(regs, amr); in interrupt_exit_kernel_prepare()
Dasm-offsets.c545 OFFSET(VCPU_AMR, kvm_vcpu, arch.amr); in main()
/arch/powerpc/include/asm/
Dkvm_book3s_64.h465 static inline int hpte_get_skey_perm(unsigned long hpte_r, unsigned long amr) in hpte_get_skey_perm() argument
471 return (amr >> (62 - 2 * skey)) & 3; in hpte_get_skey_perm()
595 vcpu->arch.amr = vcpu->arch.amr_tm; in copy_from_checkpoint()
612 vcpu->arch.amr_tm = vcpu->arch.amr; in copy_to_checkpoint()
Dprocessor.h234 unsigned long amr; member
Dkvm_host.h581 ulong amr; member
/arch/powerpc/platforms/powernv/
Didle.c306 u64 amr; member
378 sprs.amr = mfspr(SPRN_AMR); in power7_idle_insn()
397 mtspr(SPRN_AMR, sprs.amr); in power7_idle_insn()
599 u64 amr; member
688 sprs.amr = mfspr(SPRN_AMR); in power9_idle_stop()
709 mtspr(SPRN_AMR, sprs.amr); in power9_idle_stop()
/arch/powerpc/kernel/ptrace/
Dptrace-view.c479 BUILD_BUG_ON(TSO(amr) + sizeof(unsigned long) != TSO(iamr)); in pkey_get()
484 membuf_write(&to, &target->thread.amr, 2 * sizeof(unsigned long)); in pkey_get()
517 target->thread.amr = (new_amr & default_uamor) | (target->thread.amr & ~default_uamor); in pkey_set()
/arch/powerpc/kvm/
Dbook3s_emulate.c98 vcpu->arch.amr_tm = vcpu->arch.amr; in kvmppc_copyto_vcpu_tm()
117 vcpu->arch.amr = vcpu->arch.amr_tm; in kvmppc_copyfrom_vcpu_tm()
Dbook3s_64_mmu_radix.c290 if (vcpu->arch.amr & (1ul << 62)) in kvmppc_mmu_radix_xlate()
292 if (vcpu->arch.amr & (1ul << 63)) in kvmppc_mmu_radix_xlate()
Dbook3s_hv.c1687 *val = get_reg_val(id, vcpu->arch.amr); in kvmppc_get_one_reg_hv()
1926 vcpu->arch.amr = set_reg_val(id, *val); in kvmppc_set_one_reg_hv()
3670 mtspr(SPRN_AMR, vcpu->arch.amr); in kvmhv_p9_guest_entry()
3745 vcpu->arch.amr = mfspr(SPRN_AMR); in kvmhv_p9_guest_entry()
3757 if (host_amr != vcpu->arch.amr) in kvmhv_p9_guest_entry()
Dbook3s_hv_rm_mmu.c1257 unsigned int perm = hpte_get_skey_perm(gr, vcpu->arch.amr); in kvmppc_hpte_hv_fault()
Dbook3s_64_mmu_hv.c389 int amrfield = hpte_get_skey_perm(gr, vcpu->arch.amr); in kvmppc_mmu_book3s_64_hv_xlate()