qubes-doc/AssigningDevices.md
Marek Marczykowski-Górecki e829c85d5a AssigningDevices changed
info about swiotlb
2012-08-06 23:35:05 +00:00

1.2 KiB
Raw Blame History

layout title permalink
wiki AssigningDevices /wiki/AssigningDevices/

In order to assign a whole PCI/e device to a VM one should use qvm-pci tool. E.g.

lspci

Find the BDF address of the device you want to assign, and then:

qvm-pci -a <vmname> <bdf>

E.g. assuming 00:1a.0 is a BDF of the device I want to assign to "personal" domain:

qvm-pci -a personal 00:1a.0

Note that one can only assign full PCI or PCI Express devices. This means one cannot assign single USB devices -- only the whole USB controller with whatever USB devices connected to it. This limit is imposed by PC and VT-d architecture.

Possible issues

VM with PCI device in Qubes have allocated small buffer for DMA operations (called swiotlb). By default it is 2MB, but some devices needs a larger space. To change this allocation, edit VM kernel parameters (this is expressed in 512B chunks):

# qvm-prefs netvm |grep kernelopts
kernelopts       : iommu=soft swiotlb=2048 (default)
# qvm-prefs -s netvm kernelopts "iommu=soft swiotlb=4096"

This is know to be needed for Realtek RTL8111DL Gigabit Ethernet Controller.