Lines Matching +full:half +full:- +full:bit
1 // SPDX-License-Identifier: GPL-2.0-only
54 return -EINVAL; in __pkvm_alloc_private_va_range()
61 return -ENOMEM; in __pkvm_alloc_private_va_range()
69 * pkvm_alloc_private_va_range - Allocates a private VA range.
169 size = end - start; in hyp_back_vmemmap()
201 return -EINVAL; in pkvm_cpu_set_vector()
235 kvm_pte_t pte, *ptep = slot->ptep; in hyp_fixmap_map()
243 return (void *)slot->addr; in hyp_fixmap_map()
248 kvm_pte_t *ptep = slot->ptep; in fixmap_clear_slot()
249 u64 addr = slot->addr; in fixmap_clear_slot()
254 * Irritatingly, the architecture requires that we use inner-shareable in fixmap_clear_slot()
258 * break-before-make sequence. in fixmap_clear_slot()
260 …* https://lore.kernel.org/kvm/20221017115209.2099-1-will@kernel.org/T/#mf10dfbaf1eaef9274c581b81c5… in fixmap_clear_slot()
276 struct hyp_fixmap_slot *slot = per_cpu_ptr(&fixmap_slots, (u64)ctx->arg); in __create_fixmap_slot_cb()
278 if (!kvm_pte_valid(ctx->old) || ctx->level != KVM_PGTABLE_LAST_LEVEL) in __create_fixmap_slot_cb()
279 return -EINVAL; in __create_fixmap_slot_cb()
281 slot->addr = ctx->addr; in __create_fixmap_slot_cb()
282 slot->ptep = ctx->ptep; in __create_fixmap_slot_cb()
285 * Clear the PTE, but keep the page-table page refcount elevated to in __create_fixmap_slot_cb()
339 * One half of the VA space is reserved to linearly map portions of in hyp_create_idmap()
340 * memory -- see va_layout.c for more details. The other half of the VA in hyp_create_idmap()
342 * second half in two and find the quarter of VA space not conflicting in hyp_create_idmap()
344 * half of the quarter and the vmemmap the upper half. in hyp_create_idmap()
346 __io_map_base = start & BIT(hyp_va_bits - 2); in hyp_create_idmap()
347 __io_map_base ^= BIT(hyp_va_bits - 2); in hyp_create_idmap()
348 __hyp_vmemmap = __io_map_base | BIT(hyp_va_bits - 3); in hyp_create_idmap()
350 return __pkvm_create_mappings(start, end - start, start, PAGE_HYP_EXEC); in hyp_create_idmap()
363 * Efficient stack verification using the NVHE_STACK_SHIFT bit implies in pkvm_create_stack()
376 * Any valid stack address now has the NVHE_STACK_SHIFT bit as 1 in pkvm_create_stack()
378 * NVHE_STACK_SHIFT bit as 0 - this is used for overflow detection. in pkvm_create_stack()
396 if (!host_mc->nr_pages) in admit_host_page()
401 * through a full host-to-hyp donation cycle to change it. Fortunately, in admit_host_page()
405 if (__pkvm_host_donate_hyp(hyp_phys_to_pfn(host_mc->head), 1)) in admit_host_page()