mirror of
https://github.com/openbsd/src.git
synced 2024-12-22 07:27:59 -08:00
OpenBSD
77d0f8231d
virtio 1.x requires that all queue setup, including the queue interrupt vector, is done before setting the queue_enable register to 1. This conflicts with how we do things right now: * We implicitly make queue setup in virtio_alloc_vq(), which is called from the child driver attach functions. This also sets queue_enable=1. * Later, we allocate the interrupts and set the queue interrupt vectors in the second half of the virtio transport attach functions. This is a violation of a MUST from the standard and causes problems with some hypervisors, in particular those that have no virtio 0.9 support, which has no such ordering requirements. To fix this: * Move the interrupt allocation to a new virtio_attach_finish() function. This does all queue setup, including the interrupt vectors. * Don't call virtio_setup_queue() in virtio_alloc_vq() anymore. * We can also move the setting of the DRIVER_OK flag into this function. virtio_attach_finish() must be called before using any virtqueue or writing any virtio config register. While there, * also streamline the attach error handling in all drivers. * skip initially setting sc_config_change to NULL, the softc is initialized to 0. ok jan@ tested by bluhm@ |
||
---|---|---|
bin | ||
distrib | ||
etc | ||
games | ||
gnu | ||
include | ||
lib | ||
libexec | ||
regress | ||
sbin | ||
share | ||
sys | ||
usr.bin | ||
usr.sbin | ||
.gitignore | ||
Makefile | ||
Makefile.cross |