[pve-devel] [PATCH docs v6 3/4] add vIOMMU documentation

Markus Frank m.frank at proxmox.com
Tue Aug 22 14:40:40 CEST 2023


Signed-off-by: Markus Frank <m.frank at proxmox.com>
---
 qm-pci-passthrough.adoc | 31 +++++++++++++++++++++++++++++++
 qm.adoc                 |  1 +
 2 files changed, 32 insertions(+)

diff --git a/qm-pci-passthrough.adoc b/qm-pci-passthrough.adoc
index b90a0b9..9737165 100644
--- a/qm-pci-passthrough.adoc
+++ b/qm-pci-passthrough.adoc
@@ -408,6 +408,37 @@ properly used with HA and hardware changes are detected and non root users
 can configure them. See xref:resource_mapping[Resource Mapping]
 for details on that.
 
+[[qm_pci_viommu]]
+vIOMMU
+~~~~~~
+
+Using the vIOMMU option allows you to to passthrough PCI devices to level-2
+VMs in level-1 VMs via nested virtualisation.
+
+Host requirement:
+
+* Add `intel_iommu=on` or `amd_iommu=on` depending on your CPU to your kernel
+command line.
+
+VM requirements:
+
+* Whether you are using an Intel or AMD CPU on your host, it is important to set
+`intel_iommu=on` in the VMs kernel parameters.
+This is necessary because the Intel variant in QEMU is better documentated
+and has more features.
+
+* To use vIOMMU you need to set *q35* as the machine type and *kvm* needs
+to be enabled.
+
+If all requirements are met, you can add `viommu=1` to the machine parameter
+in the configuration of the VM that should be able to passthrough PCI devices.
+
+----
+# qm set VMID -machine q35,viommu=1
+----
+
+https://wiki.qemu.org/Features/VT-d
+
 ifdef::wiki[]
 
 See Also
diff --git a/qm.adoc b/qm.adoc
index b3c3034..33f02f2 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -145,6 +145,7 @@ default https://en.wikipedia.org/wiki/Intel_440FX[Intel 440FX] or the
 https://ark.intel.com/content/www/us/en/ark/products/31918/intel-82q35-graphics-and-memory-controller.html[Q35]
 chipset, which also provides a virtual PCIe bus, and thus may be desired if
 one wants to pass through PCIe hardware.
+Additionally you can use xref:qm_pci_viommu[vIOMMU] with Q35.
 
 [[qm_hard_disk]]
 Hard Disk
-- 
2.39.2






More information about the pve-devel mailing list