CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2024/01/14 19:35:23
Modified files: sys/dev/fdt : virtio_mmio.c sys/dev/pci : virtio_pci.c Log message: vio(4): poll device status after issuing device reset. The virtio spec says a driver "should" wait for a device to report a clear device status after performing a reset. In some hypervisors, this doesn't matter as the vcpu's io instruction emulation and virtio network device emulation happen serially in the same thread. In hypervisors like vmd(8), device reset happens asynchronously and the driver can't assume the device is ready. This race condition results in mbuf pool corruption, causing panics. Bug reported and reproduced by bluhm@. Root cause found and diff from sf@. ok dv@ and committed on sf@'s behalf with his permission.