svn commit: r260469 - head/usr.sbin/bhyve

Peter Grehan grehan at FreeBSD.org
Thu Jan 9 07:17:21 UTC 2014


Author: grehan
Date: Thu Jan  9 07:17:21 2014
New Revision: 260469
URL: http://svnweb.freebsd.org/changeset/base/260469

Log:
  Fix issue with the virtio descriptor region being truncated
  if it was above 4GB. This was seen with CentOS 6.5 guests with
  large RAM, since the block drivers are loaded late in the
  boot sequence and end up allocating descriptor memory from
  high addresses.
  
  Reported by:	Michael Dexter
  MFC after:	3 days

Modified:
  head/usr.sbin/bhyve/virtio.c

Modified: head/usr.sbin/bhyve/virtio.c
==============================================================================
--- head/usr.sbin/bhyve/virtio.c	Thu Jan  9 03:33:12 2014	(r260468)
+++ head/usr.sbin/bhyve/virtio.c	Thu Jan  9 07:17:21 2014	(r260469)
@@ -160,7 +160,7 @@ vi_vq_init(struct virtio_softc *vs, uint
 
 	vq = &vs->vs_queues[vs->vs_curq];
 	vq->vq_pfn = pfn;
-	phys = pfn << VRING_PFN;
+	phys = (uint64_t)pfn << VRING_PFN;
 	size = vring_size(vq->vq_qsize);
 	base = paddr_guest2host(vs->vs_pi->pi_vmctx, phys, size);
 


More information about the svn-src-head mailing list