iommu/virtio: Support bypass domains
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 1 Dec 2021 17:33:22 +0000 (17:33 +0000)
committerJoerg Roedel <jroedel@suse.de>
Mon, 6 Dec 2021 14:03:05 +0000 (15:03 +0100)
commitf0f07a8462dc2a889745b9e436b4d86d66ccc787
tree659d89892bc258ef31b5584f11ad6b8962a46296
parent063ebb19d962b45a1b505748d464bd12b5074797
iommu/virtio: Support bypass domains

The VIRTIO_IOMMU_F_BYPASS_CONFIG feature adds a new flag to the ATTACH
request, that creates a bypass domain. Use it to enable identity
domains.

When VIRTIO_IOMMU_F_BYPASS_CONFIG is not supported by the device, we
currently fail attaching to an identity domain. Future patches will
instead create identity mappings in this case.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20211201173323.1045819-3-jean-philippe@linaro.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/virtio-iommu.c