From owner-svn-src-head@FreeBSD.ORG Mon May 12 23:35:10 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD87FF72; Mon, 12 May 2014 23:35:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 AB1B52266; Mon, 12 May 2014 23:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CNZAtW021810; Mon, 12 May 2014 23:35:10 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4CNZAUm021809; Mon, 12 May 2014 23:35:10 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201405122335.s4CNZAUm021809@svn.freebsd.org> From: Neel Natu Date: Mon, 12 May 2014 23:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265941 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 23:35:10 -0000 Author: neel Date: Mon May 12 23:35:10 2014 New Revision: 265941 URL: http://svnweb.freebsd.org/changeset/base/265941 Log: abort(3) the process in response to a VMEXIT_ABORT. This usually happens in response to an unhandled VM exit or an unexpected error so a core is useful. Remove unused macro VMEXIT_SWITCH. Reviewed by: grehan Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Mon May 12 22:33:22 2014 (r265940) +++ head/usr.sbin/bhyve/bhyverun.c Mon May 12 23:35:10 2014 (r265941) @@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$"); #define GUEST_NIO_PORT 0x488 /* guest upcalls via i/o port */ -#define VMEXIT_SWITCH 0 /* force vcpu switch in mux mode */ #define VMEXIT_CONTINUE 1 /* continue from next instruction */ #define VMEXIT_RESTART 2 /* restart current instruction */ #define VMEXIT_ABORT 3 /* abort the vm run loop */ @@ -272,12 +271,6 @@ fbsdrun_deletecpu(struct vmctx *ctx, int } static int -vmexit_catch_inout(void) -{ - return (VMEXIT_ABORT); -} - -static int vmexit_handle_notify(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu, uint32_t eax) { @@ -330,7 +323,7 @@ vmexit_inout(struct vmctx *ctx, struct v fprintf(stderr, "Unhandled %s%c 0x%04x\n", in ? "in" : "out", bytes == 1 ? 'b' : (bytes == 2 ? 'w' : 'l'), port); - return (vmexit_catch_inout()); + return (VMEXIT_ABORT); } } @@ -575,6 +568,8 @@ vm_loop(struct vmctx *ctx, int vcpu, uin assert(error == 0 || errno == EALREADY); rip = vmexit[vcpu].rip + vmexit[vcpu].inst_length; break; + case VMEXIT_ABORT: + abort(); default: exit(1); }