CVSROOT: /cvs Module name: src Changes by: p...@cvs.openbsd.org 2019/12/10 23:45:17
Modified files: usr.sbin/vmd : ns8250.c ns8250.h virtio.c virtio.h vm.c vmm.c Log message: vmd: proper concurrency control when pausing a vm Removes an XXX which slept for 1s waiting for the vcpu thread to reach HLT and pause. We now define a paused and unpaused condition so that a call to pause_vm() / vmctl pause blocks till the vm really reaches a paused state. Also, detach events for devices from event loop when pausing and add them back when unpausing. This is because some callbacks call pthread_mutex_lock and if the vm is paused, it would block also causing the libevent thread to block. This would mean that we would not be able to process any IMSGs received from vmm (parent process) including a message to unpause. ok mlarkin@