svn commit: r253854 - head/sys/amd64/vmm

Peter Grehan grehan at FreeBSD.org
Thu Aug 1 05:59:29 UTC 2013


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 <at> 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;


More information about the svn-src-all mailing list