]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r348929
authorVincenzo Maffione <vmaffione@FreeBSD.org>
Wed, 3 Jul 2019 19:56:05 +0000 (19:56 +0000)
committerVincenzo Maffione <vmaffione@FreeBSD.org>
Wed, 3 Jul 2019 19:56:05 +0000 (19:56 +0000)
commit10fcb48b78e557e8cf8c5ca510bc1d180605e877
tree4960c6379ce7db6ac0942539ad154ad288293ad9
parent63f2a4495229a3adca63ab66abe85b41a589e35e
MFC r348929

bhyve: virtio: introduce vq_kick_enable() and vq_kick_disable()

The VirtIO standard supports two schemes for notification suppression:
a notification enable bit and a more sophisticated one (event_idx) that
also supports delayed notifications. Currently bhyve fully supports
only the first scheme. This patch hides the notification suppression
internals by means of two inline routines, vq_kick_enable() and
vq_kick_disable(), and makes the code more readable.
Moreover, further improve readability by replacing the call to mb()
with a call to atomic_thread_fence_seq_cst(), which is already used
in virtio.c

Reviewed by:    pmooney_pfmooney.com, bryanv
Differential Revision:  https://reviews.freebsd.org/D20581
usr.sbin/bhyve/pci_virtio_console.c
usr.sbin/bhyve/pci_virtio_net.c
usr.sbin/bhyve/pci_virtio_scsi.c
usr.sbin/bhyve/virtio.c
usr.sbin/bhyve/virtio.h