summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd/vmd.c
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2019-05-11 01:05:18 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2019-05-11 01:05:18 +0000
commit6070324fbf2dcaf994ee99e84a5f6bfbd4860086 (patch)
treee7aa24eedc7d8f4ddd8212d16b47dc8349cc7436 /usr.sbin/vmd/vmd.c
parent6307336275b3489172cdaa80de167bee698538cd (diff)
sync the vm state in vmd too when (un)pausing a vm, otherwise the vm process
knows the vm is paused, but vmd does not. ok mlarkin@ pd@
Diffstat (limited to 'usr.sbin/vmd/vmd.c')
-rw-r--r--usr.sbin/vmd/vmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c
index 3f0cfff2f23..b8f9cdd2c84 100644
--- a/usr.sbin/vmd/vmd.c
+++ b/usr.sbin/vmd/vmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmd.c,v 1.108 2018/12/09 12:26:38 claudio Exp $ */
+/* $OpenBSD: vmd.c,v 1.109 2019/05/11 01:05:17 jasper Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -345,6 +345,7 @@ vmd_dispatch_vmm(int fd, struct privsep_proc *p, struct imsg *imsg)
log_info("%s: paused vm %d successfully",
vm->vm_params.vmc_params.vcp_name,
vm->vm_vmid);
+ vm->vm_paused = 1;
break;
case IMSG_VMDOP_UNPAUSE_VM_RESPONSE:
IMSG_SIZE_CHECK(imsg, &vmr);
@@ -357,6 +358,7 @@ vmd_dispatch_vmm(int fd, struct privsep_proc *p, struct imsg *imsg)
log_info("%s: unpaused vm %d successfully.",
vm->vm_params.vmc_params.vcp_name,
vm->vm_vmid);
+ vm->vm_paused = 0;
break;
case IMSG_VMDOP_START_VM_RESPONSE:
IMSG_SIZE_CHECK(imsg, &vmr);