From owner-svn-src-all@freebsd.org Thu Nov 5 08:27:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EA52A25885; Thu, 5 Nov 2015 08:27:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44A241602; Thu, 5 Nov 2015 08:27:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA58Rjlt092294; Thu, 5 Nov 2015 08:27:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA58Rj0p092293; Thu, 5 Nov 2015 08:27:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511050827.tA58Rj0p092293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Nov 2015 08:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290386 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 08:27:46 -0000 Author: ngie Date: Thu Nov 5 08:27:45 2015 New Revision: 290386 URL: https://svnweb.freebsd.org/changeset/base/290386 Log: MFC r289746: Exit with a user-friendly message instead of tripping an assert if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..) PR: 203884 Reviewed by: grehan Submitted by: William Orr Modified: stable/10/usr.sbin/bhyve/bhyverun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Thu Nov 5 07:48:48 2015 (r290385) +++ stable/10/usr.sbin/bhyve/bhyverun.c Thu Nov 5 08:27:45 2015 (r290386) @@ -258,7 +258,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);