Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2015 08:37:11 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289746 - head/usr.sbin/bhyve
Message-ID:  <201510220837.t9M8bB6f011281@repo.freebsd.org>

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



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