Lines Matching full:vm

24  * structure kvm_util is using to maintain the state of a VM.
85 int vm_enable_cap(struct kvm_vm *vm, struct kvm_enable_cap *cap);
86 int vcpu_enable_cap(struct kvm_vm *vm, uint32_t vcpu_id,
88 void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size);
95 void kvm_vm_get_dirty_log(struct kvm_vm *vm, int slot, void *log);
96 void kvm_vm_clear_dirty_log(struct kvm_vm *vm, int slot, void *log,
98 uint32_t kvm_vm_reset_dirty_ring(struct kvm_vm *vm);
100 int kvm_memcmp_hva_gva(void *hva, struct kvm_vm *vm, const vm_vaddr_t gva,
103 void kvm_vm_elf_load(struct kvm_vm *vm, const char *filename);
105 void vm_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent);
108 * VM VCPU Dump
112 * vm - Virtual Machine
120 * Dumps the current state of the VCPU specified by @vcpuid, within the VM
121 * given by @vm, to the FILE stream given by @stream.
123 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid,
126 void vm_create_irqchip(struct kvm_vm *vm);
128 void vm_userspace_mem_region_add(struct kvm_vm *vm,
133 void vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
135 int _vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
137 void vm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
138 int _vm_ioctl(struct kvm_vm *vm, unsigned long cmd, void *arg);
139 void kvm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
140 int _kvm_ioctl(struct kvm_vm *vm, unsigned long ioctl, void *arg);
141 void vm_mem_region_set_flags(struct kvm_vm *vm, uint32_t slot, uint32_t flags);
142 void vm_mem_region_move(struct kvm_vm *vm, uint32_t slot, uint64_t new_gpa);
143 void vm_mem_region_delete(struct kvm_vm *vm, uint32_t slot);
144 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid);
145 vm_vaddr_t vm_vaddr_alloc(struct kvm_vm *vm, size_t sz, vm_vaddr_t vaddr_min);
146 vm_vaddr_t vm_vaddr_alloc_pages(struct kvm_vm *vm, int nr_pages);
147 vm_vaddr_t vm_vaddr_alloc_page(struct kvm_vm *vm);
149 void virt_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr,
151 void *addr_gpa2hva(struct kvm_vm *vm, vm_paddr_t gpa);
152 void *addr_gva2hva(struct kvm_vm *vm, vm_vaddr_t gva);
153 vm_paddr_t addr_hva2gpa(struct kvm_vm *vm, void *hva);
154 void *addr_gpa2alias(struct kvm_vm *vm, vm_paddr_t gpa);
160 * vm - Virtual Machine
161 * gva - VM virtual address
166 * Equivalent VM physical address
168 * Returns the VM physical address of the translated VM virtual
171 vm_paddr_t addr_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva);
173 struct kvm_run *vcpu_state(struct kvm_vm *vm, uint32_t vcpuid);
174 void vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
175 int _vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
176 int vcpu_get_fd(struct kvm_vm *vm, uint32_t vcpuid);
177 void vcpu_run_complete_io(struct kvm_vm *vm, uint32_t vcpuid);
178 void vcpu_set_guest_debug(struct kvm_vm *vm, uint32_t vcpuid,
180 void vcpu_set_mp_state(struct kvm_vm *vm, uint32_t vcpuid,
182 struct kvm_reg_list *vcpu_get_reg_list(struct kvm_vm *vm, uint32_t vcpuid);
183 void vcpu_regs_get(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_regs *regs);
184 void vcpu_regs_set(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_regs *regs);
187 * VM VCPU Args Set
190 * vm - Virtual Machine
204 void vcpu_args_set(struct kvm_vm *vm, uint32_t vcpuid, unsigned int num, ...);
206 void vcpu_sregs_get(struct kvm_vm *vm, uint32_t vcpuid,
208 void vcpu_sregs_set(struct kvm_vm *vm, uint32_t vcpuid,
210 int _vcpu_sregs_set(struct kvm_vm *vm, uint32_t vcpuid,
212 void vcpu_fpu_get(struct kvm_vm *vm, uint32_t vcpuid,
214 void vcpu_fpu_set(struct kvm_vm *vm, uint32_t vcpuid,
216 void vcpu_get_reg(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_one_reg *reg);
217 void vcpu_set_reg(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_one_reg *reg);
219 void vcpu_events_get(struct kvm_vm *vm, uint32_t vcpuid,
221 void vcpu_events_set(struct kvm_vm *vm, uint32_t vcpuid,
225 void vcpu_nested_state_get(struct kvm_vm *vm, uint32_t vcpuid,
227 int vcpu_nested_state_set(struct kvm_vm *vm, uint32_t vcpuid,
230 void *vcpu_map_dirty_ring(struct kvm_vm *vm, uint32_t vcpuid);
234 int _kvm_create_device(struct kvm_vm *vm, uint64_t type, bool test, int *fd);
235 int kvm_create_device(struct kvm_vm *vm, uint64_t type, bool test);
243 void virt_pgd_alloc(struct kvm_vm *vm);
246 * VM Virtual Page Map
249 * vm - Virtual Machine
250 * vaddr - VM Virtual Address
251 * paddr - VM Physical Address
258 * Within @vm, creates a virtual translation for the page starting
261 void virt_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr);
263 vm_paddr_t vm_phy_page_alloc(struct kvm_vm *vm, vm_paddr_t paddr_min,
265 vm_paddr_t vm_phy_pages_alloc(struct kvm_vm *vm, size_t num,
267 vm_paddr_t vm_alloc_page_table(struct kvm_vm *vm);
270 * Create a VM with reasonable defaults
273 * vcpuid - The id of the single VCPU to add to the VM.
282 * Pointer to opaque structure that describes the created VM.
302 * vm - Virtual Machine
303 * vcpuid - The id of the VCPU to add to the VM.
306 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code);
308 bool vm_is_unrestricted_guest(struct kvm_vm *vm);
310 unsigned int vm_get_page_size(struct kvm_vm *vm);
311 unsigned int vm_get_page_shift(struct kvm_vm *vm);
312 uint64_t vm_get_max_gfn(struct kvm_vm *vm);
313 int vm_get_fd(struct kvm_vm *vm);
331 kvm_userspace_memory_region_find(struct kvm_vm *vm, uint64_t start,
337 int vm_create_device(struct kvm_vm *vm, struct kvm_create_device *cd);
339 #define sync_global_to_guest(vm, g) ({ \ argument
340 typeof(g) *_p = addr_gva2hva(vm, (vm_vaddr_t)&(g)); \
344 #define sync_global_from_guest(vm, g) ({ \ argument
345 typeof(g) *_p = addr_gva2hva(vm, (vm_vaddr_t)&(g)); \
349 void assert_on_unhandled_exception(struct kvm_vm *vm, uint32_t vcpuid);
367 void ucall_init(struct kvm_vm *vm, void *arg);
368 void ucall_uninit(struct kvm_vm *vm);
370 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc);
400 int vm_get_stats_fd(struct kvm_vm *vm);
401 int vcpu_get_stats_fd(struct kvm_vm *vm, uint32_t vcpuid);