summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-09-01 19:56:09 +0000
committerGerrit Code Review <review@openstack.org>2022-09-01 19:56:09 +0000
commit457806e2064dbf0d8d2c75f8ed2a9deb0176b6b2 (patch)
tree43012c120e490bf455b52dafbd5b32fdb6329ca7 /doc/source
parent8b55b44cc605533f2a12189a2b5899c0f58c91a7 (diff)
parent14e3b352c24b2a1fe54ba13a733cf6e7989215cc (diff)
downloadnova-457806e2064dbf0d8d2c75f8ed2a9deb0176b6b2.tar.gz
Merge "libvirt: Add vIOMMU device to guest"
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/admin/pci-passthrough.rst58
1 files changed, 58 insertions, 0 deletions
diff --git a/doc/source/admin/pci-passthrough.rst b/doc/source/admin/pci-passthrough.rst
index 6017d95515..32e5c2fee6 100644
--- a/doc/source/admin/pci-passthrough.rst
+++ b/doc/source/admin/pci-passthrough.rst
@@ -429,3 +429,61 @@ the PF and its VFs are made available for consumption.
For deeper technical details please read the `nova specification. <https://specs.openstack.org/openstack/nova-specs/specs/zed/approved/pci-device-tracking-in-placement.html>`_
+
+
+Virtual IOMMU support
+---------------------
+
+With provided :nova:extra-spec:`hw:viommu_model` flavor extra spec or equivalent
+image metadata property ``hw_viommu_model`` and with the guest CPU architecture
+and OS allows, we can enable vIOMMU in libvirt driver.
+
+.. note::
+
+ Enable vIOMMU might introduce significant performance overhead.
+ You can see performance comparision table from
+ `AMD vIOMMU session on KVM Forum 2021`_.
+ For the above reason, vIOMMU should only be enabled for workflow that
+ require it.
+
+.. _`AMD vIOMMU session on KVM Forum 2021`: https://static.sched.com/hosted_files/kvmforum2021/da/vIOMMU%20KVM%20Forum%202021%20-%20v4.pdf
+
+Here are four possible values allowed for ``hw:viommu_model``
+(and ``hw_viommu_model``):
+
+**virtio**
+ Supported on Libvirt since 8.3.0, for Q35 and ARM virt guests.
+
+**smmuv3**
+ Supported on Libvirt since 5.5.0, for ARM virt guests.
+**intel**
+ Supported for for Q35 guests.
+
+**auto**
+ This option will translate to ``virtio`` if Libvirt supported,
+ else ``intel`` on X86 (Q35) and ``smmuv3`` on AArch64.
+
+For the viommu attributes:
+
+* ``intremap``, ``caching_mode``, and ``iotlb``
+ options for viommu (These attributes are driver attributes defined in
+ `Libvirt IOMMU Domain`_) will direcly enabled.
+
+* ``eim`` will directly enabled if machine type is Q35.
+ ``eim`` is driver attribute defined in `Libvirt IOMMU Domain`_.
+
+.. note::
+
+ eim(Extended Interrupt Mode) attribute (with possible values on and off)
+ can be used to configure Extended Interrupt Mode.
+ A q35 domain with split I/O APIC (as described in hypervisor features),
+ and both interrupt remapping and EIM turned on for the IOMMU, will be
+ able to use more than 255 vCPUs. Since 3.4.0 (QEMU/KVM only).
+
+* ``aw_bits`` attribute can used to set the address width to allow mapping
+ larger iova addresses in the guest. Since Qemu current supported
+ values are 39 and 48, we directly set this to larger width (48)
+ if Libvirt supported.
+ ``aw_bits`` is driver attribute defined in `Libvirt IOMMU Domain`_.
+
+.. _`Libvirt IOMMU Domain`: https://libvirt.org/formatdomain.html#iommu-devices