]> git.proxmox.com Git - mirror_qemu.git/commit
hw/i386/pc: Allow instantiating a virtio-iommu device
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Tue, 26 Oct 2021 18:20:23 +0000 (19:20 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Nov 2021 22:49:10 +0000 (18:49 -0400)
commit36efa250a4ff56a73a5a73540c5097ffd7a67170
tree269b91a14edbecc1f50cbe8cb57e7fc2e9e042e1
parent1b3bf13890fd849b2628ca8c059f8d63c74b9572
hw/i386/pc: Allow instantiating a virtio-iommu device

Allow instantiating a virtio-iommu device by adding an ACPI Virtual I/O
Translation table (VIOT), which describes the relation between the
virtio-iommu and the endpoints it manages.

Add a hotplug handler for virtio-iommu on x86 and set the necessary
reserved region property. On x86, the [0xfee00000, 0xfeefffff] DMA
region is reserved for MSIs. DMA transactions to this range either
trigger IRQ remapping in the IOMMU or bypasses IOMMU translation.

Although virtio-iommu does not support IRQ remapping it must be informed
of the reserved region so that it can forward DMA transactions targeting
this region.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Message-Id: <20211026182024.2642038-5-jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/Kconfig
hw/i386/acpi-build.c
hw/i386/pc.c