Searched refs:max_mem_slots (Results 1 – 2 of 2) sorted by relevance
/Linux-v6.6/tools/testing/selftests/kvm/ |
D | set_memory_region_test.c | 337 uint32_t max_mem_slots; in test_add_max_memory_regions() local 349 max_mem_slots = kvm_check_cap(KVM_CAP_NR_MEMSLOTS); in test_add_max_memory_regions() 350 TEST_ASSERT(max_mem_slots > 0, in test_add_max_memory_regions() 352 pr_info("Allowed number of memory slots: %i\n", max_mem_slots); in test_add_max_memory_regions() 358 (max_mem_slots - 1), MEM_REGION_SIZE >> 10); in test_add_max_memory_regions() 360 mem = mmap(NULL, (size_t)max_mem_slots * MEM_REGION_SIZE + alignment, in test_add_max_memory_regions() 366 for (slot = 0; slot < max_mem_slots; slot++) in test_add_max_memory_regions() 377 ret = __vm_set_user_memory_region(vm, max_mem_slots, 0, in test_add_max_memory_regions() 378 (uint64_t)max_mem_slots * MEM_REGION_SIZE, in test_add_max_memory_regions() 383 munmap(mem, (size_t)max_mem_slots * MEM_REGION_SIZE + alignment); in test_add_max_memory_regions()
|
D | memslot_perf_test.c | 954 uint32_t max_mem_slots; in parse_args() local 1006 max_mem_slots = kvm_check_cap(KVM_CAP_NR_MEMSLOTS); in parse_args() 1007 if (max_mem_slots <= 1) { in parse_args() 1014 targs->nslots = max_mem_slots - 1; in parse_args() 1016 targs->nslots = min_t(int, targs->nslots, max_mem_slots) - 1; in parse_args()
|