Lines Matching refs:vmp
446 void kvm_vm_restart(struct kvm_vm *vmp) in kvm_vm_restart() argument
451 vm_open(vmp); in kvm_vm_restart()
452 if (vmp->has_irqchip) in kvm_vm_restart()
453 vm_create_irqchip(vmp); in kvm_vm_restart()
455 hash_for_each(vmp->regions.slot_hash, ctr, region, slot_node) { in kvm_vm_restart()
456 int ret = ioctl(vmp->fd, KVM_SET_USER_MEMORY_REGION, ®ion->region); in kvm_vm_restart()
661 void kvm_vm_release(struct kvm_vm *vmp) in kvm_vm_release() argument
666 list_for_each_entry_safe(vcpu, tmp, &vmp->vcpus, list) in kvm_vm_release()
667 vm_vcpu_rm(vmp, vcpu); in kvm_vm_release()
669 ret = close(vmp->fd); in kvm_vm_release()
672 ret = close(vmp->kvm_fd); in kvm_vm_release()
707 void kvm_vm_free(struct kvm_vm *vmp) in kvm_vm_free() argument
713 if (vmp == NULL) in kvm_vm_free()
717 if (vmp->stats_fd) { in kvm_vm_free()
718 free(vmp->stats_desc); in kvm_vm_free()
719 close(vmp->stats_fd); in kvm_vm_free()
723 hash_for_each_safe(vmp->regions.slot_hash, ctr, node, region, slot_node) in kvm_vm_free()
724 __vm_mem_region_delete(vmp, region, false); in kvm_vm_free()
727 sparsebit_free(&vmp->vpages_valid); in kvm_vm_free()
728 sparsebit_free(&vmp->vpages_mapped); in kvm_vm_free()
730 kvm_vm_release(vmp); in kvm_vm_free()
733 free(vmp); in kvm_vm_free()