VIRTIO(4)
π VIRTIO(4) β the VirtIO device support glow-up π
okay so this is VIRTIO(4), straight out of the Kernel Interfaces Manual, and bestie, it's literally the page that explains how your VM gets its I/O without the hypervisor doing that slow, cringe emulation thing. let's get into it π«Ά
β¨ NAME β¨
virtio β VirtIO Device Support. that's it, that's the vibe.
πΈ SYNOPSIS πΈ
so if you wanna compile VirtIO device support into the kernel (main character energy), you drop these lines into your kernel configuration file:
device virtio
device virtio_pci
or, if you'd rather load VirtIO support as modules at boot time (lowkey easier), you put these in loader.conf(5):
virtio_load="YES"
virtio_pci_load="YES"
either way, slay π
π¦ DESCRIPTION π¦
okay so VirtIO is a specification for para-virtualized I/O in a virtual machine (VM). and like, here's the context: traditionally the hypervisor emulated real devices β an Ethernet interface, a disk controller, whatever β just to give the VM some I/O. and that emulation? often inefficient. not it. π
VirtIO defines an interface for efficient I/O between the hypervisor and the VM. the virtio module provides a shared memory transport called a virtqueue (iconic, honestly). the virtio_pci device driver represents an emulated PCI device that the hypervisor makes available to the VM β and that device provides all the probing, configuration, and interrupt notifications you need to interact with the hypervisor. no cap.
FreeBSD supports the following VirtIO devices, and yes, each one has its own little driver bestie:
- Ethernet β an emulated Ethernet device is provided by the
vtnet(4)device driver. π - Block β an emulated disk controller is provided by the
virtio_blk(4)device driver. - Console β provided by the
virtio_console(4)driver. - Entropy β provided by the
virtio_random(4)driver. random but make it β¨entropyβ¨ - Balloon β a pseudo-device that lets the VM release memory back to the hypervisor, provided by the
virtio_balloon(4)device driver. - GPU β graphics support is provided by the
virtio_gpu(4)device driver. π - SCSI β an emulated SCSI HBA is provided by the
virtio_scsi(4)device driver.
π LOADER TUNABLES π
these tunables can be set at the loader(8) prompt before you boot the kernel, or stored in loader.conf(5). your call, bestie π«Ά
hw.virtio.pci.disable_msixβ if set to1, disables MSI-X. the default value is0.hw.virtio.pci.transitionalβ for a transitional virtio device, this tunable says whether to negotiate modern mode and use the modern virtio driver (1), or negotiate legacy mode and use the legacy virtio driver (0). the default value is0.
heads up: those defaults are0and0, so don't come for me if you assumed otherwise π
π SEE ALSO π
virtio_balloon(4), virtio_blk(4), virtio_console(4), virtio_gpu(4), virtio_random(4), virtio_scsi(4), vtnet(4)
go read them, they're all part of the family fr fr π
β HISTORY β
support for VirtIO first appeared in FreeBSD 9.0. vintage but make it functional π
πΈ AUTHORS πΈ
FreeBSD support for VirtIO was first added by Bryan Venteicher <bryanv@FreeBSD.org>. thank you for your service, king π
and that's the whole page, bestie! this lil rendition comes to you from Debian, dated April 4, 2026 β mwah, bye! πβ¨π¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2011 Bryan Venteicher
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms