public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Markus Frank <m.frank@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH docs v6 3/4] add vIOMMU documentation
Date: Tue, 22 Aug 2023 14:40:40 +0200	[thread overview]
Message-ID: <20230822124041.119554-4-m.frank@proxmox.com> (raw)
In-Reply-To: <20230822124041.119554-1-m.frank@proxmox.com>

Signed-off-by: Markus Frank <m.frank@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





  parent reply	other threads:[~2023-08-22 12:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 12:40 [pve-devel] [PATCH qemu-server/docs/manager v6 0/4] vIOMMU-Feature #3784 Markus Frank
2023-08-22 12:40 ` [pve-devel] [PATCH qemu-server v6 1/4] feature #3784: Parameter for guest vIOMMU & machine as property-string Markus Frank
2023-09-07  7:47   ` Thomas Lamprecht
2023-09-07  7:57   ` Fiona Ebner
2023-08-22 12:40 ` [pve-devel] [PATCH qemu-server v6 2/4] tests: test-cases for new machine-syntax & viommu Markus Frank
2023-08-22 12:40 ` Markus Frank [this message]
2023-08-22 12:40 ` [pve-devel] [PATCH manager v6 4/4] ui: MachineEdit with viommu checkbox Markus Frank

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230822124041.119554-4-m.frank@proxmox.com \
    --to=m.frank@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal