diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-05-05 20:16:41 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-05-05 20:16:41 +0000 |
commit | a18b1b09abd1111bdd110a4b9723404cef187a5b (patch) | |
tree | bb5f18597f956a4f0dd3c830830d20bee6e36821 /usr.sbin | |
parent | a2f038fe0e13beaaf254881e37c3335e37d6ce26 (diff) |
VMs cannot use proc_compose() to PROC_VMM, they have to use
imsg_compose() on the "vmm_pipe" directly. This fixes the
communication channel from VMs back to vmm.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vmd/vm.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c index cd7ccdb36a9..4183c5301bc 100644 --- a/usr.sbin/vmd/vm.c +++ b/usr.sbin/vmd/vm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm.c,v 1.16 2017/05/05 07:48:02 mlarkin Exp $ */ +/* $OpenBSD: vm.c,v 1.17 2017/05/05 20:16:40 reyk Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -409,22 +409,20 @@ vm_dispatch_vmm(int fd, short event, void *arg) __dead void vm_shutdown(unsigned int cmd) { - struct privsep *ps = &env->vmd_ps; - switch (cmd) { case VMMCI_NONE: case VMMCI_SHUTDOWN: - (void)proc_compose(ps, PROC_VMM, - IMSG_VMDOP_VM_SHUTDOWN, NULL, 0); + (void)imsg_compose_event(¤t_vm->vm_iev, + IMSG_VMDOP_VM_SHUTDOWN, 0, 0, -1, NULL, 0); break; case VMMCI_REBOOT: - (void)proc_compose(ps, PROC_VMM, - IMSG_VMDOP_VM_REBOOT, NULL, 0); + (void)imsg_compose_event(¤t_vm->vm_iev, + IMSG_VMDOP_VM_REBOOT, 0, 0, -1, NULL, 0); break; default: fatalx("invalid vm ctl command: %d", cmd); } - proc_flush_imsg(ps, PROC_VMM, -1); + imsg_flush(¤t_vm->vm_iev.ibuf); _exit(0); } |