/tools/testing/selftests/kvm/ |
D | max_guest_memory_test.c | 23 uint64_t gpa; in guest_code() local 25 for (gpa = start_gpa; gpa < end_gpa; gpa += stride) in guest_code() 26 *((volatile uint64_t *)gpa) = gpa; in guest_code() 96 uint64_t gpa, nr_bytes; in spawn_workers() local 110 for (i = 0, gpa = start_gpa; i < nr_vcpus; i++, gpa += nr_bytes) { in spawn_workers() 112 info[i].start_gpa = gpa; in spawn_workers() 113 info[i].end_gpa = gpa + nr_bytes; in spawn_workers() 170 uint64_t max_gpa, gpa, slot_size, max_mem, i; in main() local 232 gpa = 0; in main() 234 gpa = start_gpa + ((slot - first_slot) * slot_size); in main() [all …]
|
D | memslot_modification_stress_test.c | 69 uint64_t gpa; in add_remove_memslot() local 76 gpa = memstress_args.gpa - pages * vm->page_size; in add_remove_memslot() 80 vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, gpa, in add_remove_memslot()
|
D | memslot_perf_test.c | 185 static void *vm_gpa2hva(struct vm_data *data, uint64_t gpa, uint64_t *rempages) in vm_gpa2hva() argument 192 TEST_ASSERT(gpa >= MEM_GPA, "Too low gpa to translate"); in vm_gpa2hva() 193 TEST_ASSERT(gpa < MEM_GPA + data->npages * guest_page_size, in vm_gpa2hva() 195 gpa -= MEM_GPA; in vm_gpa2hva() 197 gpage = gpa / guest_page_size; in vm_gpa2hva() 198 pgoffs = gpa % guest_page_size; in vm_gpa2hva() 331 uint64_t gpa; in prepare_vm() local 337 gpa = vm_phy_pages_alloc(data->vm, npages, guest_addr, slot); in prepare_vm() 338 TEST_ASSERT(gpa == guest_addr, in prepare_vm() 632 uint64_t gpa, ctr; in test_memslot_do_unmap() local [all …]
|
D | set_memory_region_test.c | 116 uint64_t gpa; in spawn_vm() local 128 gpa = vm_phy_pages_alloc(vm, 2, MEM_REGION_GPA, MEM_REGION_SLOT); in spawn_vm() 129 TEST_ASSERT(gpa == MEM_REGION_GPA, "Failed vm_phy_pages_alloc\n"); in spawn_vm()
|
D | demand_paging_test.c | 152 prefault_mem(addr_gpa2alias(vm, vcpu_args->gpa), in run_test() 166 vcpu_hva = addr_gpa2hva(vm, vcpu_args->gpa); in run_test()
|
/tools/testing/selftests/kvm/lib/ |
D | memstress.c | 109 vcpu_args->gpa = args->gpa + (i * vcpu_memory_bytes); in memstress_setup_vcpus() 114 vcpu_args->gpa = args->gpa; in memstress_setup_vcpus() 120 i, vcpu_args->gpa, vcpu_args->gpa + in memstress_setup_vcpus() 197 args->gpa = (region_end_gfn - guest_num_pages - 1) * args->guest_page_size; in memstress_create_vm() 198 args->gpa = align_down(args->gpa, backing_src_pagesz); in memstress_create_vm() 201 args->gpa = align_down(args->gpa, 1 << 20); in memstress_create_vm() 205 args->gpa, args->gpa + args->size); in memstress_create_vm() 210 vm_paddr_t region_start = args->gpa + region_pages * args->guest_page_size * i; in memstress_create_vm() 218 virt_map(vm, guest_test_virt_mem, args->gpa, guest_num_pages); in memstress_create_vm()
|
D | kvm_util.c | 879 uint64_t gpa, uint64_t size, void *hva) in __vm_set_user_memory_region() argument 884 .guest_phys_addr = gpa, in __vm_set_user_memory_region() 893 uint64_t gpa, uint64_t size, void *hva) in vm_set_user_memory_region() argument 895 int ret = __vm_set_user_memory_region(vm, slot, flags, gpa, size, hva); in vm_set_user_memory_region() 1478 void *addr_gpa2hva(struct kvm_vm *vm, vm_paddr_t gpa) in addr_gpa2hva() argument 1482 region = userspace_mem_region_find(vm, gpa, gpa); in addr_gpa2hva() 1484 TEST_FAIL("No vm physical memory at 0x%lx", gpa); in addr_gpa2hva() 1489 + (gpa - region->region.guest_phys_addr)); in addr_gpa2hva() 1552 void *addr_gpa2alias(struct kvm_vm *vm, vm_paddr_t gpa) in addr_gpa2alias() argument 1557 region = userspace_mem_region_find(vm, gpa, gpa); in addr_gpa2alias() [all …]
|
/tools/testing/selftests/kvm/x86_64/ |
D | smaller_maxphyaddr_emulation_test.c | 55 uint64_t gpa; in main() local 75 gpa = vm_phy_pages_alloc(vm, MEM_REGION_SIZE / PAGE_SIZE, in main() 77 TEST_ASSERT(gpa == MEM_REGION_GPA, "Failed vm_phy_pages_alloc\n"); in main()
|
D | hyperv_tlb_flush.c | 587 vm_paddr_t gpa; in main() local 623 gpa = addr_hva2gpa(vm, pte); in main() 624 __virt_pg_map(vm, gva + PAGE_SIZE * i, gpa & PAGE_MASK, PG_LEVEL_4K); in main() 625 data->test_pages_pte[i] = gva + (gpa & ~PAGE_MASK); in main()
|
D | xen_shinfo_test.c | 509 .u.gpa = VCPU_INFO_ADDR, in main() 515 .u.gpa = PVTIME_ADDR, in main() 532 .u.gpa = RUNSTATE_ADDR, in main() 1052 .u.gpa = runstate_addr, in main()
|
/tools/testing/selftests/kvm/lib/s390x/ |
D | processor.c | 50 void virt_arch_pg_map(struct kvm_vm *vm, uint64_t gva, uint64_t gpa) in virt_arch_pg_map() argument 63 TEST_ASSERT((gpa % vm->page_size) == 0, in virt_arch_pg_map() 67 TEST_ASSERT((gpa >> vm->page_shift) <= vm->max_gfn, in virt_arch_pg_map() 85 "WARNING: PTE for gpa=0x%"PRIx64" already set!\n", gpa); in virt_arch_pg_map() 86 entry[idx] = gpa; in virt_arch_pg_map()
|
/tools/testing/selftests/kvm/include/ |
D | memstress.h | 23 uint64_t gpa; member 35 uint64_t gpa; member
|
D | kvm_util_base.h | 435 uint64_t gpa, uint64_t size, void *hva); 437 uint64_t gpa, uint64_t size, void *hva); 459 void *addr_gpa2hva(struct kvm_vm *vm, vm_paddr_t gpa); 462 void *addr_gpa2alias(struct kvm_vm *vm, vm_paddr_t gpa);
|
/tools/testing/selftests/kvm/lib/x86_64/ |
D | memstress.c | 75 start = align_down(memstress_args.gpa, PG_SIZE_1G); in memstress_setup_ept() 76 end = align_up(memstress_args.gpa + memstress_args.size, PG_SIZE_1G); in memstress_setup_ept()
|
/tools/include/uapi/linux/ |
D | kvm.h | 1848 __u64 gpa; member
|