From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 608E08A51 for ; Tue, 22 Aug 2023 14:41:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 314B1CD35 for ; Tue, 22 Aug 2023 14:41:04 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 22 Aug 2023 14:41:02 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9B3F84331D for ; Tue, 22 Aug 2023 14:41:02 +0200 (CEST) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Tue, 22 Aug 2023 14:40:40 +0200 Message-Id: <20230822124041.119554-4-m.frank@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230822124041.119554-1-m.frank@proxmox.com> References: <20230822124041.119554-1-m.frank@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.052 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemu.org, wikipedia.org, intel.com] Subject: [pve-devel] [PATCH docs v6 3/4] add vIOMMU documentation X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Aug 2023 12:41:34 -0000 Signed-off-by: Markus Frank --- 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