Author: andrew
Date: Tue Dec 30 12:47:44 2014
New Revision: 276409
URL: https://svnweb.freebsd.org/changeset/base/276409

Log:
  Set the page size in the virtio-mmio driver. Some backends, e.g QEMU, assume
  a 1 byte page size until told otherwise.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/virtio/mmio/virtio_mmio.c

Modified: head/sys/dev/virtio/mmio/virtio_mmio.c
==============================================================================
--- head/sys/dev/virtio/mmio/virtio_mmio.c      Tue Dec 30 10:30:12 2014        
(r276408)
+++ head/sys/dev/virtio/mmio/virtio_mmio.c      Tue Dec 30 12:47:44 2014        
(r276409)
@@ -506,6 +506,8 @@ vtmmio_alloc_virtqueues(device_t dev, in
        if (sc->vtmmio_vqs == NULL)
                return (ENOMEM);
 
+       vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_PAGE_SIZE, 1 << PAGE_SHIFT);
+
        for (idx = 0; idx < nvqs; idx++) {
                vqx = &sc->vtmmio_vqs[idx];
                info = &vq_info[idx];
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to