Searched refs:page_shift (Results 1 – 11 of 11) sorted by relevance
/tools/testing/selftests/powerpc/mm/ |
D | bad_accesses.c | 69 unsigned long i, j, addr, region_shift, page_shift, page_size; in test() local 84 page_shift = 16; in test() 86 page_shift = 12; in test() 103 (1 << page_shift) >> 10, in test() 121 for (j = page_shift - 1; j < 60; j++) { in test() 130 addr = (base | delta) & ~((1 << page_shift) - 1); in test()
|
/tools/testing/selftests/kvm/lib/aarch64/ |
D | processor.c | 26 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in pgd_index() 34 unsigned int shift = 2 * (vm->page_shift - 3) + vm->page_shift; in pud_index() 35 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pud_index() 45 unsigned int shift = (vm->page_shift - 3) + vm->page_shift; in pmd_index() 46 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pmd_index() 56 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pte_index() 57 return (gva >> vm->page_shift) & mask; in pte_index() 62 uint64_t mask = ((1UL << (vm->va_bits - vm->page_shift)) - 1) << vm->page_shift; in pte_addr() 68 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in ptrs_per_pgd() 74 return 1 << (vm->page_shift - 3); in ptrs_per_pte() [all …]
|
/tools/testing/selftests/vm/ |
D | hmm-tests.c | 60 unsigned int page_shift; in FIXTURE() local 68 unsigned int page_shift; in FIXTURE() local 87 self->page_shift = ffs(self->page_size) - 1; in FIXTURE_SETUP() 96 self->page_shift = ffs(self->page_size) - 1; in FIXTURE_SETUP() 234 npages = ALIGN(HMM_BUFFER_SIZE, self->page_size) >> self->page_shift; in TEST_F() 236 size = npages << self->page_shift; in TEST_F() 297 npages = ALIGN(HMM_BUFFER_SIZE, self->page_size) >> self->page_shift; in TEST_F() 299 size = npages << self->page_shift; in TEST_F() 356 npages = ALIGN(HMM_BUFFER_SIZE, self->page_size) >> self->page_shift; in TEST_F() 358 size = npages << self->page_shift; in TEST_F() [all …]
|
/tools/testing/selftests/kvm/lib/x86_64/ |
D | vmx.c | 408 TEST_ASSERT((nested_paddr >> vm->page_shift) <= vm->max_gfn, in nested_pg_map() 416 TEST_ASSERT((paddr >> vm->page_shift) <= vm->max_gfn, in nested_pg_map() 429 pml4e[index[3]].address = vm_alloc_page_table(vm) >> vm->page_shift; in nested_pg_map() 439 pdpe[index[2]].address = vm_alloc_page_table(vm) >> vm->page_shift; in nested_pg_map() 449 pde[index[1]].address = vm_alloc_page_table(vm) >> vm->page_shift; in nested_pg_map() 458 pte[index[0]].address = paddr >> vm->page_shift; in nested_pg_map() 514 i = (region->region.guest_phys_addr >> vm->page_shift) - 1; in nested_map_memslot() 515 last = i + (region->region.memory_size >> vm->page_shift); in nested_map_memslot() 522 (uint64_t)i << vm->page_shift, in nested_map_memslot() 523 (uint64_t)i << vm->page_shift, in nested_map_memslot() [all …]
|
D | processor.c | 160 uint64_t *page_table = addr_gpa2hva(vm, pt_pfn << vm->page_shift); in virt_get_pte() 161 int index = vaddr >> (vm->page_shift + level * 9) & 0x1ffu; in virt_get_pte() 210 TEST_ASSERT(sparsebit_is_set(vm->vpages_valid, (vaddr >> vm->page_shift)), in __virt_pg_map() 215 TEST_ASSERT((paddr >> vm->page_shift) <= vm->max_gfn, in __virt_pg_map() 224 pml4e = virt_create_upper_pte(vm, vm->pgd >> vm->page_shift, in __virt_pg_map() 280 (vaddr >> vm->page_shift)), in _vm_get_page_table_entry() 1417 const unsigned long num_ht_pages = 12 << (30 - vm->page_shift); /* 12 GiB */ in vm_compute_max_gfn() 1421 max_gfn = (1ULL << (vm->pa_bits - vm->page_shift)) - 1; in vm_compute_max_gfn() 1455 max_pfn = (1ULL << ((eax & 0xff) - vm->page_shift)) - 1; in vm_compute_max_gfn()
|
/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 243 vm->page_shift = vm_guest_mode_params[mode].page_shift; in vm_create() 304 0, (1ULL << (vm->va_bits - 1)) >> vm->page_shift); in vm_create() 306 (~((1ULL << (vm->va_bits - 1)) - 1)) >> vm->page_shift, in vm_create() 307 (1ULL << (vm->va_bits - 1)) >> vm->page_shift); in vm_create() 711 if ((ptr1 >> vm->page_shift) != ((ptr1 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva() 713 if ((ptr2 >> vm->page_shift) != ((ptr2 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva() 716 assert((ptr1 >> vm->page_shift) == ((ptr1 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva() 717 assert((ptr2 >> vm->page_shift) == ((ptr2 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva() 827 TEST_ASSERT((((guest_paddr >> vm->page_shift) + npages) - 1) in vm_userspace_mem_region_add() 928 guest_paddr >> vm->page_shift, npages); in vm_userspace_mem_region_add() [all …]
|
D | kvm_util_internal.h | 54 unsigned int page_shift; member
|
/tools/testing/selftests/kvm/lib/s390x/ |
D | processor.c | 60 (gva >> vm->page_shift)), in virt_pg_map() 67 TEST_ASSERT((gpa >> vm->page_shift) <= vm->max_gfn, in virt_pg_map()
|
/tools/arch/powerpc/include/uapi/asm/ |
D | kvm.h | 349 __u32 page_shift; member 439 __u8 page_shift; member
|
/tools/testing/selftests/kvm/include/ |
D | kvm_util.h | 79 unsigned int page_shift; member
|
/tools/include/uapi/linux/ |
D | kvm.h | 812 __u32 page_shift; /* Page shift (or 0) */ member 817 __u32 page_shift; /* Base page shift of segment (or 0) */ member
|