vmd: fix rebooting a received vm
authordv <dv@openbsd.org>
Sun, 8 May 2022 14:44:54 +0000 (14:44 +0000)
committerdv <dv@openbsd.org>
Sun, 8 May 2022 14:44:54 +0000 (14:44 +0000)
commit7933afb4f78fcd37184cfadd0bb160dcacd550d3
treec7bc5152149f0047b29c24a3d4dcef1b8cdfcd82
parent6e97c8592d65d67ce8f366e5504eb25254c32e63
vmd: fix rebooting a received vm

Rebooting a received vm resulted in vmd(8) exiting as a result of
flawed state tracking in the parent process.

When stopping a vm, clear the VM_RECEIVE_STATE flag. When starting
a vm, make sure the parent process collapses any existing memory
ranges after the vm is sent to the vmm process (responsible for
launching the vm).

ok mlarkin@
usr.sbin/vmd/config.c
usr.sbin/vmd/vmd.c