IOMMU: fold flush-all hook into "flush one"
authorJan Beulich <jbeulich@suse.com>
Thu, 9 Jun 2022 08:54:30 +0000 (10:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jun 2022 08:54:30 +0000 (10:54 +0200)
commit79faa321f2f31d7794604007a290fb6c8fc05035
tree989e6d788441b94fb95d24f53ab943a332dea41a
parent8dac2928c2c1160c00dea65f9beb07656d249f3c
IOMMU: fold flush-all hook into "flush one"

Having a separate flush-all hook has always been puzzling me some. We
will want to be able to force a full flush via accumulated flush flags
from the map/unmap functions. Introduce a respective new flag and fold
all flush handling to use the single remaining hook.

Note that because of the respective comments in SMMU and IPMMU-VMSA
code, I've folded the two prior hook functions into one. For SMMU-v3,
which lacks a comment towards incapable hardware, I've left both
functions in place on the assumption that selective and full flushes
will eventually want separating.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> # IPMMU-VMSA, SMMU-V2
Reviewed-by: Rahul Singh <rahul.singh@arm.com> # SMMUv3
Acked-by: Julien Grall <jgrall@amazon.com> # Arm
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/amd/iommu.h
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/arm/ipmmu-vmsa.c
xen/drivers/passthrough/arm/smmu-v3.c
xen/drivers/passthrough/arm/smmu.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/xen/iommu.h