Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Apr 2014 20:53:54 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264516 - head/sys/amd64/vmm
Message-ID:  <201404152053.s3FKrsPF030116@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404152053.s3FKrsPF030116>