Home
last modified time | relevance | path

Searched refs:page_shift (Results 1 – 19 of 19) sorted by relevance

/tools/testing/selftests/powerpc/mm/
Dbad_accesses.c69 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/
Dprocessor.c27 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in pgd_index()
35 unsigned int shift = 2 * (vm->page_shift - 3) + vm->page_shift; in pud_index()
36 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pud_index()
46 unsigned int shift = (vm->page_shift - 3) + vm->page_shift; in pmd_index()
47 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pmd_index()
57 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pte_index()
58 return (gva >> vm->page_shift) & mask; in pte_index()
65 pte = pa & GENMASK(47, vm->page_shift); in addr_pte()
66 if (vm->page_shift == 16) in addr_pte()
77 pa = pte & GENMASK(47, vm->page_shift); in pte_addr()
[all …]
/tools/testing/selftests/mm/
Dhmm-tests.c72 unsigned int page_shift; in FIXTURE() local
95 unsigned int page_shift; in FIXTURE() local
137 self->page_shift = ffs(self->page_size) - 1; in FIXTURE_SETUP()
148 self->page_shift = ffs(self->page_size) - 1; in FIXTURE_SETUP()
302 npages = ALIGN(HMM_BUFFER_SIZE, self->page_size) >> self->page_shift; in TEST_F()
304 size = npages << self->page_shift; in TEST_F()
365 npages = ALIGN(HMM_BUFFER_SIZE, self->page_size) >> self->page_shift; in TEST_F()
367 size = npages << self->page_shift; in TEST_F()
424 npages = ALIGN(HMM_BUFFER_SIZE, self->page_size) >> self->page_shift; in TEST_F()
426 size = npages << self->page_shift; in TEST_F()
[all …]
/tools/testing/selftests/bpf/progs/
Dbpf_iter_vma_offset.c13 __u32 page_shift = 0; variable
33 offset = address - vma->vm_start + (vma->vm_pgoff << page_shift); in get_vma_offset()
/tools/testing/selftests/kvm/lib/
Dkvm_util.c206 0, (1ULL << (vm->va_bits - 1)) >> vm->page_shift); in vm_vaddr_populate_bitmap()
208 (~((1ULL << (vm->va_bits - 1)) - 1)) >> vm->page_shift, in vm_vaddr_populate_bitmap()
209 (1ULL << (vm->va_bits - 1)) >> vm->page_shift); in vm_vaddr_populate_bitmap()
230 vm->page_shift = vm_guest_mode_params[mode].page_shift; in ____vm_create()
801 if ((ptr1 >> vm->page_shift) != ((ptr1 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva()
803 if ((ptr2 >> vm->page_shift) != ((ptr2 + amt) >> vm->page_shift)) in kvm_memcmp_hva_gva()
806 assert((ptr1 >> vm->page_shift) == ((ptr1 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva()
807 assert((ptr2 >> vm->page_shift) == ((ptr2 + amt - 1) >> vm->page_shift)); in kvm_memcmp_hva_gva()
941 TEST_ASSERT((((guest_paddr >> vm->page_shift) + npages) - 1) in vm_userspace_mem_region_add()
1040 guest_paddr >> vm->page_shift, npages); in vm_userspace_mem_region_add()
[all …]
/tools/testing/selftests/kvm/lib/x86_64/
Dvmx.c380 pte->address = paddr >> vm->page_shift; in nested_create_pte()
382 pte->address = vm_alloc_page_table(vm) >> vm->page_shift; in nested_create_pte()
416 TEST_ASSERT((nested_paddr >> vm->page_shift) <= vm->max_gfn, in __nested_pg_map()
424 TEST_ASSERT((paddr >> vm->page_shift) <= vm->max_gfn, in __nested_pg_map()
506 i = (region->region.guest_phys_addr >> vm->page_shift) - 1; in nested_map_memslot()
507 last = i + (region->region.memory_size >> vm->page_shift); in nested_map_memslot()
514 (uint64_t)i << vm->page_shift, in nested_map_memslot()
515 (uint64_t)i << vm->page_shift, in nested_map_memslot()
516 1 << vm->page_shift); in nested_map_memslot()
Dprocessor.c194 TEST_ASSERT(sparsebit_is_set(vm->vpages_valid, (vaddr >> vm->page_shift)), in __virt_pg_map()
199 TEST_ASSERT((paddr >> vm->page_shift) <= vm->max_gfn, in __virt_pg_map()
274 (vaddr >> vm->page_shift)), in __vm_get_page_table_entry()
1249 const unsigned long num_ht_pages = 12 << (30 - vm->page_shift); /* 12 GiB */ in vm_compute_max_gfn()
1253 max_gfn = (1ULL << (vm->pa_bits - vm->page_shift)) - 1; in vm_compute_max_gfn()
1277 max_pfn = (1ULL << (maxphyaddr - vm->page_shift)) - 1; in vm_compute_max_gfn()
/tools/testing/selftests/kvm/lib/s390x/
Dprocessor.c60 (gva >> vm->page_shift)), in virt_arch_pg_map()
67 TEST_ASSERT((gpa >> vm->page_shift) <= vm->max_gfn, in virt_arch_pg_map()
/tools/testing/selftests/kvm/x86_64/
Dvmx_apic_access_test.c87 high_gpa = (vm->max_gfn - 1) << vm->page_shift; in main()
Ddirty_log_page_splitting_test.c106 guest_num_pages = (VCPUS * guest_percpu_mem_size) >> vm->page_shift; in run_test()
/tools/testing/selftests/kvm/s390x/
Dcmma_test.c116 TEST_DATA_START_GFN << vm->page_shift, in create_test_memslot()
333 TEST_DATA_TWO_START_GFN << vm->page_shift, in test_migration_mode()
/tools/arch/powerpc/include/uapi/asm/
Dkvm.h349 __u32 page_shift; member
439 __u8 page_shift; member
/tools/testing/selftests/kvm/lib/riscv/
Dprocessor.c78 (vaddr >> vm->page_shift)), in virt_arch_pg_map()
83 TEST_ASSERT((paddr >> vm->page_shift) <= vm->max_gfn, in virt_arch_pg_map()
/tools/testing/selftests/kvm/
Dmax_guest_memory_test.c219 max_gpa = vm->max_gfn << vm->page_shift; in main()
Ddirty_log_test.c287 pages = (1ul << (DIRTY_MEM_BITS - vm->page_shift)) + 3; in dirty_ring_create_vm_done()
733 guest_num_pages = (1ul << (DIRTY_MEM_BITS - vm->page_shift)) + 3; in run_test()
Ddirty_log_perf_test.c163 guest_num_pages = (nr_vcpus * guest_percpu_mem_size) >> vm->page_shift; in run_test()
/tools/testing/selftests/kvm/include/
Dkvm_util_base.h97 unsigned int page_shift; member
230 unsigned int page_shift; member
/tools/include/uapi/linux/
Dkvm.h868 __u32 page_shift; /* Page shift (or 0) */ member
873 __u32 page_shift; /* Base page shift of segment (or 0) */ member
/tools/testing/selftests/bpf/prog_tests/
Dbpf_iter.c1590 skel->bss->page_shift = shift; in test_task_vma_offset_common()