Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2012 22:32:27 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r242163 - projects/bhyve/sys/amd64/vmm
Message-ID:  <201210262232.q9QMWRnA019173@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210262232.q9QMWRnA019173>