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
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
usr.sbin/bhyve/pci_virtio_block.c | ||
---|---|---|
42 ↗ | (On Diff #58461) | Worth adding the include to virtio.h rather than requiring it in each of the consumers? |
usr.sbin/bhyve/pci_virtio_block.c | ||
---|---|---|
42 ↗ | (On Diff #58461) | Agree, that was also my idea. But I observed that virtio.h does not include anything, so I assumed there was a reason for that. |