Lines Matching +full:linear +full:- +full:mapping +full:- +full:mode
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012,2013 - ARM Ltd
20 * Instead, give the HYP mode its own VA region at a fixed offset from
29 * and that half of that space (VA_BITS - 1) is used for the linear
30 * mapping, we can also limit the EL2 space to (VA_BITS - 1).
33 * top or the bottom half of that space to shadow the kernel's linear
34 * mapping?". As we need to idmap the trampoline page, this is
41 * if (T & BIT(VA_BITS - 1))
44 * HYP_VA_MIN = 1 << (VA_BITS - 1)
45 * HYP_VA_MAX = HYP_VA_MIN + (1 << (VA_BITS - 1)) - 1
96 /* Convert hyp VA -> PA. */
107 /* Convert PA -> kimg VA. */
141 * We currently support using a VM-specified IPA size. For backward
146 #define kvm_phys_shift(kvm) VTCR_EL2_IPA(kvm->arch.vtcr)
148 #define kvm_phys_mask(kvm) (kvm_phys_size(kvm) - _AC(1, ULL))
176 int idx = slot - (slot != HYP_VECTOR_DIRECT);
227 * We are not in the kvm->srcu critical section most of the time, so we take
234 int srcu_idx = srcu_read_lock(&kvm->srcu);
237 srcu_read_unlock(&kvm->srcu, srcu_idx);
245 int srcu_idx = srcu_read_lock(&kvm->srcu);
248 srcu_read_unlock(&kvm->srcu, srcu_idx);
262 struct kvm_vmid *vmid = &mmu->vmid;
266 baddr = mmu->pgd_phys;
267 vmid_field = (u64)READ_ONCE(vmid->vmid) << VTTBR_VMID_SHIFT;
278 write_sysreg(arch->vtcr, vtcr_el2);
291 return container_of(mmu->arch, struct kvm, arch);