VIRTIO_SCSI(4)

πŸ’– VIRTIO_SCSI(4) πŸ’–

okay bestie, so this is a section 4 page β€” that's the Kernel Interfaces Manual, aka the place where the kernel driver lore lives 🫢 pull up a chair, we're talking about virtio_scsi, the VirtIO SCSI driver. yes, that's the whole NAME. slay.


✨ SYNOPSIS ✨

so like, there are two ways to get this driver into your life, and both are valid πŸ’…

Option A β€” bake it right into the kernel. drop these lines into your kernel configuration file:

device virtio_scsi

Option B β€” module girlie. load it as a module at boot time by putting this line in loader.conf(5):

virtio_scsi_load="YES"

pick your fighter, both eat πŸŽ€


🌸 DESCRIPTION 🌸

the virtio_scsi device driver provides support for VirtIO SCSI devices. that's it, that's the vibe. it's giving "does exactly what it says on the tin" and honestly? iconic. ✨


πŸ¦‹ LOADER TUNABLES πŸ¦‹

tunables can be set at the loader(8) prompt before booting the kernel, or stored in loader.conf(5). set them early or set them forever, your call πŸ’œ

  • hw.vtscsi.bus_reset_disable β€” so here's the tea πŸ“: in the initial QEMU release with VirtIO SCSI support, in-flight operations were not aborted when stopping the device, which rendered bus reset ineffective. tragic. this tunable disables attempts to issue reset bus commands. the default value is 1.
not me side-eyeing an entire QEMU release 😭 the default here is 1, so keep that in mind before you go flipping switches.

πŸ”₯ DEBUGGING πŸ”₯

wanna see what the virtio_scsi driver is yapping about internally? set the

hw.vtscsi.X.debug_level

variable β€” where X is the adapter number β€” either in loader.conf(5) or via sysctl(8). the following bits have the described effects, and yes we're doing bit math, it's giving computer science major πŸ’€

  • 0x01 β€” Enable informational prints.
  • 0x02 β€” Enable prints for driver errors.
  • 0x04 β€” Enable tracing prints.

lowkey the move is to add them together if you want the full lore dump. iykyk πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘


🌈 HISTORY 🌈

the virtio_scsi driver was written by Bryan Venteicher <bryanv@FreeBSD.org> πŸ’– it first appeared in FreeBSD 10.0. a legend, a pioneer, main character energy fr fr.


and that's the whole page bestie, no cap πŸŽ€ this one came from the Debian crew, dated June 24, 2012 β€” so go forth, load your virtio_scsi, and stay hydrated πŸ’…πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from