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
This commit is contained in:
Andrew Turner 2014-12-30 12:47:44 +00:00
parent 454035ba1b
commit 7c5c5b97fe

View File

@ -506,6 +506,8 @@ vtmmio_alloc_virtqueues(device_t dev, int flags, int nvqs,
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];