]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
If a vcpu has issued a HLT instruction with interrupts disabled then it sleeps
authorNeel Natu <neel@FreeBSD.org>
Sat, 26 Jul 2014 02:53:51 +0000 (02:53 +0000)
committerNeel Natu <neel@FreeBSD.org>
Sat, 26 Jul 2014 02:53:51 +0000 (02:53 +0000)
commitf008d1571d75fd329198839b0dd67ab84681a0de
tree5210df9d99ccf6d6e69f126ce422e52cca1fc6e4
parent1edccd0f303dadb94bb5e5cded99f7cc37b10ae0
If a vcpu has issued a HLT instruction with interrupts disabled then it sleeps
forever in vm_handle_hlt().

This is usually not an issue as long as one of the other vcpus properly resets
or powers off the virtual machine. However, if the bhyve(8) process is killed
with a signal the halted vcpu cannot be woken up because it's sleep cannot be
interrupted.

Fix this by waking up periodically and returning from vm_handle_hlt() if
TDF_ASTPENDING is set.

Reported by: Leon Dang
Sponsored by: Nahanni Systems
sys/amd64/include/vmm.h
sys/amd64/vmm/intel/vmx.c
sys/amd64/vmm/vmm.c