svn commit: r242163 - projects/bhyve/sys/amd64/vmm

Peter Grehan grehan at FreeBSD.org
Fri Oct 26 22:32:27 UTC 2012


Author: grehan
Date: Fri Oct 26 22:32:26 2012
New Revision: 242163
URL: http://svn.freebsd.org/changeset/base/242163

Log:
  Set the valid field of the newly allocated field as all other
  vm page allocators do. This fixes a panic when a virtio block
  device is mounted as root, with the host system dying in
  vm_page_dirty with invalid bits.
  
  Reviewed by:	neel
  Obtained from:	NetApp

Modified:
  projects/bhyve/sys/amd64/vmm/vmm_mem.c

Modified: projects/bhyve/sys/amd64/vmm/vmm_mem.c
==============================================================================
--- projects/bhyve/sys/amd64/vmm/vmm_mem.c	Fri Oct 26 21:25:10 2012	(r242162)
+++ projects/bhyve/sys/amd64/vmm/vmm_mem.c	Fri Oct 26 22:32:26 2012	(r242163)
@@ -99,6 +99,7 @@ vmm_mem_alloc(size_t size)
 	
 	if ((m->flags & PG_ZERO) == 0)
 		pagezero((void *)PHYS_TO_DMAP(pa));
+	m->valid = VM_PAGE_BITS_ALL;
 
 	update_pages_allocated(1);
 


More information about the svn-src-projects mailing list