Lines Matching refs:vm
52 struct kvm_vm *vm; member
96 struct kvm_vm *vm; in create_vm() local
116 vm = vm_create(mode, pages, O_RDWR); in create_vm()
117 kvm_vm_elf_load(vm, program_invocation_name, 0, 0); in create_vm()
119 vm_create_irqchip(vm); in create_vm()
122 perf_test_args.vm = vm; in create_vm()
123 perf_test_args.guest_page_size = vm_get_page_size(vm); in create_vm()
137 TEST_ASSERT(guest_num_pages < vm_get_max_gfn(vm), in create_vm()
140 guest_num_pages, vm_get_max_gfn(vm), vcpus, in create_vm()
146 guest_test_phys_mem = (vm_get_max_gfn(vm) - guest_num_pages) * in create_vm()
158 vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, in create_vm()
164 virt_map(vm, guest_test_virt_mem, guest_test_phys_mem, guest_num_pages, 0); in create_vm()
166 ucall_init(vm, NULL); in create_vm()
168 return vm; in create_vm()
171 static void add_vcpus(struct kvm_vm *vm, int vcpus, uint64_t vcpu_memory_bytes) in add_vcpus() argument
180 vm_vcpu_add_default(vm, vcpu_id, guest_code); in add_vcpus()
183 vcpu_set_cpuid(vm, vcpu_id, kvm_get_supported_cpuid()); in add_vcpus()