Index: sys/dev/virtio/mmio/virtio_mmio.c =================================================================== --- sys/dev/virtio/mmio/virtio_mmio.c +++ sys/dev/virtio/mmio/virtio_mmio.c @@ -818,8 +818,11 @@ /* * Setting the status to RESET sets the host device to - * the original, uninitialized state. + * the original, uninitialized state. This includes + * clearing pointers to virtqueue, so tear down all the + * virtqueues. */ + vtmmio_free_virtqueues(sc); vtmmio_set_status(sc->dev, VIRTIO_CONFIG_STATUS_RESET); } Index: sys/dev/virtio/network/if_vtnet.c =================================================================== --- sys/dev/virtio/network/if_vtnet.c +++ sys/dev/virtio/network/if_vtnet.c @@ -3068,6 +3068,11 @@ vtnet_stop(sc); + if (vtnet_alloc_virtqueues(sc) != 0) { + device_printf(dev, "cannot allocate virtqueues\n"); + goto fail; + } + /* Reinitialize with the host. */ if (vtnet_virtio_reinit(sc) != 0) goto fail;