virtio-iommu: Add bypass mode support to assigned device
commit90519b90539b16258d1d52b908b199f44877dc18
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Mon, 13 Jun 2022 06:10:08 +0000 (13 14:10 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 16 Jun 2022 16:54:58 +0000 (16 12:54 -0400)
tree2b362751aa48cad7fcbbe1307b06162824f1f0ee
parentb595d6272e9219bf70a9baf6d37f64045907f03b
virtio-iommu: Add bypass mode support to assigned device

Currently assigned devices can not work in virtio-iommu bypass mode.
Guest driver fails to probe the device due to DMA failure. And the
reason is because of lacking GPA -> HPA mappings when VM is created.

Add a root container memory region to hold both bypass memory region
and iommu memory region, so the switch between them is supported
just like the implementation in virtual VT-d.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20220613061010.2674054-2-zhenzhong.duan@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/trace-events
hw/virtio/virtio-iommu.c
include/hw/virtio/virtio-iommu.h