Lines Matching +full:half +full:-
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012,2013 - ARM Ltd
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
37 * If the page is in the bottom half, we have to use the top half. If
38 * the page is in the top half, we have to use the bottom half:
41 * if (T & BIT(VA_BITS - 1))
42 * HYP_VA_MIN = 0 //idmap in upper half
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. */
143 * We currently support using a VM-specified IPA size. For backward
148 #define kvm_phys_shift(kvm) VTCR_EL2_IPA(kvm->arch.vtcr)
150 #define kvm_phys_mask(kvm) (kvm_phys_size(kvm) - _AC(1, ULL))
183 int idx = slot - (slot != HYP_VECTOR_DIRECT);
234 * We are not in the kvm->srcu critical section most of the time, so we take
241 int srcu_idx = srcu_read_lock(&kvm->srcu);
244 srcu_read_unlock(&kvm->srcu, srcu_idx);
252 int srcu_idx = srcu_read_lock(&kvm->srcu);
255 srcu_read_unlock(&kvm->srcu, srcu_idx);
269 struct kvm_vmid *vmid = &mmu->vmid;
273 baddr = mmu->pgd_phys;
274 vmid_field = atomic64_read(&vmid->id) << VTTBR_VMID_SHIFT;
286 write_sysreg(arch->vtcr, vtcr_el2);
299 return container_of(mmu->arch, struct kvm, arch);