PCIBACK(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸŽ€ PCIBACK β€” Xen backend paravirtualized PCI pass-through driver πŸŽ€

hiii bestie, welcome to the pciback(4) page from the xen Kernel Interfaces Manual. no cap, this is the one about the Xen backend paravirtualized PCI pass-through driver, and it’s lowkey iconic. let’s get into it πŸ’…βœ¨

🌸 NAME 🌸

pciback β€” Xen backend paravirtualized PCI pass-through driver

✨ SYNOPSIS ✨

pciback* at pci?

πŸ’– DESCRIPTION πŸ’–

okay so the pciback driver is literally the backend part of the PCI pass-through functionality that can be used by the Xen dom0 to export pci(4) devices to a guest domain. to export a PCI device to a guest domain, the device has to be attached to pciback in the dom0. periodt.

and when the guest domain is NetBSD, the device attached to the pciback driver will attach to a xpci(4) bus inside the guest domain. that’s the whole vibe πŸ¦‹


πŸ› οΈ EXAMPLES πŸ› οΈ

to attach a device to the pciback driver, follow these steps, bestie:

  1. look for the device PCI ID, via pcictl(8). πŸ’…
  2. edit boot.cfg(5) and add the PCI ID to the list of PCI IDs that you want to attach to pciback, in bus:device.function notation. the list is passed to dom0 module via the pciback.hide parameter:
pciback.hide=(bus:dev.fun)(bus:dev.func)(...)

See also boot(8).

  1. reboot dom0. yes, really 😭
  2. add the PCI ID to the list of PCI devices in the domain configuration file:
pci = ['bus:dev.fun', '...']
  1. start the guest domain. slay πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

go peek at those if you need more tea πŸ‘‘

πŸ•°οΈ HISTORY πŸ•°οΈ

The pciback driver first appeared in NetBSD 5.1. a whole era 🌈

πŸ‘‘ AUTHORS πŸ‘‘

The pciback driver was written by Manuel Bouyer <bouyer@NetBSD.org>. iconic behavior, fr fr 🫢

⚠️ CAVEATS ⚠️

Currently, to attach a device to the pciback backend, this procedure has to be performed at boot(8) time. In the future, it will be possible to do it without requiring a dom0 reboot. so rn it’s giving β€œreboot first, bestie,” but future-you might get to skip that step πŸ’€

πŸ”’ SECURITY CONSIDERATIONS πŸ”’

As PCI passthrough offers the possibility for guest domains to send arbitrary PCI commands to a physical device, this has direct impact on the overall stability and security of the system. For example, in case of erroneous or malicious commands, the device could overwrite physical memory portions, via DMA. not me being dramatic β€” that is literally a big security deal, so pay attention πŸ™ˆ


mwah πŸ’‹ and that’s the page, bestie. the footer tea is source/version Debian, date January 8, 2011 β€” cute, vintage, documented. bye πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from