svn commit: r264516 - head/sys/amd64/vmm
John Baldwin
jhb at FreeBSD.org
Tue Apr 15 20:53:54 UTC 2014
Author: jhb
Date: Tue Apr 15 20:53:53 2014
New Revision: 264516
URL: http://svnweb.freebsd.org/changeset/base/264516
Log:
Don't spindown the BSP if it executes hlt with the APIC disabled. A
guest that doesn't use the APIC at all can trigger this, plus the BSP
always needs to execute as it should trigger a reset, etc.
Reviewed by: tychon
Modified:
head/sys/amd64/vmm/vmm.c
Modified: head/sys/amd64/vmm/vmm.c
==============================================================================
--- head/sys/amd64/vmm/vmm.c Tue Apr 15 20:41:55 2014 (r264515)
+++ head/sys/amd64/vmm/vmm.c Tue Apr 15 20:53:53 2014 (r264516)
@@ -1036,10 +1036,12 @@ vm_handle_hlt(struct vm *vm, int vcpuid,
msleep_spin(vcpu, &vcpu->mtx, "vmidle", timo);
} else {
/*
- * Spindown the vcpu if the apic is disabled and it
- * had entered the halted state.
+ * Spindown the vcpu if the APIC is disabled and it
+ * had entered the halted state, but never spin
+ * down the BSP.
*/
- spindown = 1;
+ if (vcpuid != 0)
+ spindown = 1;
}
vcpu_require_state_locked(vcpu, VCPU_FROZEN);
vmm_stat_incr(vm, vcpuid, VCPU_IDLE_TICKS, ticks - t);
More information about the svn-src-all
mailing list