Prepare vionet to be handled asynchronously to the VCPU thread
authorstefan <stefan@openbsd.org>
Sat, 9 Jul 2016 09:06:22 +0000 (09:06 +0000)
committerstefan <stefan@openbsd.org>
Sat, 9 Jul 2016 09:06:22 +0000 (09:06 +0000)
commite44e04278855350d6c4e057a8696a8b8fc1ba393
tree15c4b40a650d82640c3f7e00e3ce493082e97db6
parentbe305a23133b5d918199b46054e57124e70a5442
Prepare vionet to be handled asynchronously to the VCPU thread

This splits the handling of received data into a separate function
that can later be called in parallel to the VCPU thread instead of
handling received packets on VCPU exits only.

It also makes virtq accesses in the rx path safe to run in parallel
to the VCPU thread: the last index into the 'avail' ring the driver
has notified to the host is kept track of. It also makes sure that
the host only writes back to the 'avail' ring instead of modifying
the whole receive virtq.

While there, describe what virtio_vq_info and virtio_io_cfg are used
for, as suggested by mlarkin@

ok mlarkin@
usr.sbin/vmd/virtio.c
usr.sbin/vmd/virtio.h
usr.sbin/vmd/vmd.h
usr.sbin/vmd/vmm.c