iommu/virtio: Break out bypass identity support into a global static
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 8 Apr 2025 16:35:47 +0000 (13:35 -0300)
committerJoerg Roedel <jroedel@suse.de>
Mon, 28 Apr 2025 11:14:57 +0000 (13:14 +0200)
commit0d76a6edae9eeae5364285296b69d73dacb152f3
treea4abbd6ce3e31466070c51fff6d39a4ac0378110
parentf984fb09e60e0e2db5ad5be9d4cfcefb2008fda1
iommu/virtio: Break out bypass identity support into a global static

To make way for a domain_alloc_paging conversion add the typical global
static IDENTITY domain. This supports VMMs that have a
VIRTIO_IOMMU_F_BYPASS_CONFIG config.

If the VMM does not have support then the domain_alloc path is still used,
which creates an IDENTITY domain out of a paging domain.

Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/1-v4-ff5fb6b03bd1+288-iommu_virtio_domains_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/virtio-iommu.c