From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 05:59:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B241B3F; Thu, 1 Aug 2013 05:59:29 +0000 (UTC) (envelope-from grehan@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18F4A2AB5; Thu, 1 Aug 2013 05:59:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r715xSp6068445; Thu, 1 Aug 2013 05:59:28 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r715xSff068444; Thu, 1 Aug 2013 05:59:28 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201308010559.r715xSff068444@svn.freebsd.org> From: Peter Grehan Date: Thu, 1 Aug 2013 05:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253854 - head/sys/amd64/vmm X-SVN-Group: head 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.14 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, 01 Aug 2013 05:59:29 -0000 Author: grehan Date: Thu Aug 1 05:59:28 2013 New Revision: 253854 URL: http://svnweb.freebsd.org/changeset/base/253854 Log: Moved clearing of vmm_initialized to avoid the case of unloading the module while VMs existed. This would result in EBUSY, but would prevent further operations on VMs resulting in the module being impossible to unload. Submitted by: Tycho Nightingale (tycho.nightingale plurisbusnetworks.com) Reviewed by: grehan, neel Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Thu Aug 1 05:50:42 2013 (r253853) +++ head/sys/amd64/vmm/vmm.c Thu Aug 1 05:59:28 2013 (r253854) @@ -224,8 +224,13 @@ vmm_handler(module_t mod, int what, void iommu_cleanup(); vmm_ipi_cleanup(); error = VMM_CLEANUP(); + /* + * Something bad happened - prevent new + * VMs from being created + */ + if (error) + vmm_initialized = 0; } - vmm_initialized = 0; break; default: error = 0;