svn commit: r289746 - head/usr.sbin/bhyve

Garrett Cooper ngie at FreeBSD.org
Thu Oct 22 08:37:12 UTC 2015


Author: ngie
Date: Thu Oct 22 08:37:11 2015
New Revision: 289746
URL: https://svnweb.freebsd.org/changeset/base/289746

Log:
  Exit with a user-friendly message instead of tripping an assert
  if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..)
  
  MFC after: 1 week
  PR: 203884
  Reviewed by: grehan
  Submitted by: William Orr <will at worrbase.com>

Modified:
  head/usr.sbin/bhyve/bhyverun.c

Modified: head/usr.sbin/bhyve/bhyverun.c
==============================================================================
--- head/usr.sbin/bhyve/bhyverun.c	Thu Oct 22 08:08:06 2015	(r289745)
+++ head/usr.sbin/bhyve/bhyverun.c	Thu Oct 22 08:37:11 2015	(r289746)
@@ -261,7 +261,8 @@ fbsdrun_addcpu(struct vmctx *ctx, int fr
 	 * with vm_suspend().
 	 */
 	error = vm_activate_cpu(ctx, newcpu);
-	assert(error == 0);
+	if (error != 0)
+		err(EX_OSERR, "could not activate CPU %d", newcpu);
 
 	CPU_SET_ATOMIC(newcpu, &cpumask);
 


More information about the svn-src-head mailing list