linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] iommu: Define EINVAL as device/domain incompatibility
@ 2022-09-13  8:24 Nicolin Chen
  2022-09-13  8:24 ` [PATCH 1/5] iommu/msm: Add missing __disable_clocks calls Nicolin Chen
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Nicolin Chen @ 2022-09-13  8:24 UTC (permalink / raw)
  To: joro, suravee.suthikulpanit, will, robin.murphy, robdclark,
	dwmw2, baolu.lu, agross, bjorn.andersson, konrad.dybcio,
	matthias.bgg, heiko, orsonzhai, baolin.wang, zhang.lyra,
	thierry.reding, jean-philippe, jgg, sricharan
  Cc: linux-kernel, linux-arm-msm, yangyingliang, jon, iommu,
	shameerali.kolothum.thodi, jonathanh, linux-rockchip,
	christophe.jaillet, linux-arm-kernel, thunder.leizhen,
	linux-tegra, linux-mediatek, tglx, virtualization, yong.wu

This series is to replace the previous EMEDIUMTYPE patch in a VFIO series:
https://lore.kernel.org/kvm/Yxnt9uQTmbqul5lf@8bytes.org/

The purpose is to regulate all existing ->attach_dev callback functions to
use EINVAL exclusively for an incompatibility error between a device and a
domain. This allows VFIO and IOMMUFD to detect such a soft error, and then
try a different domain with the same device.

Among the five patches, the first two are preparatory changes. And then a
patch to update kdocs and another two patches for the enforcement efforts.

Although it might be ideal to merge the previous VFIO series together with
this series, given the number of new changes, the review in the IOMMU list
might need a couple of rounds to finalize. Also, considering that v6.0 is
at rc5 now, perhaps we could merge this IOMMU series and the VFIO one in
different cycles to avoid merge conflicts. If there's less concern for it,
I can respin the finalized version of this series with the previous VFIO
one to merge together into the VFIO tree.

This series is also available on Github:
https://github.com/nicolinc/iommufd/commits/iommu_attach_dev

Thanks!

Nicolin Chen (5):
  iommu/msm: Add missing __disable_clocks calls
  iommu/amd: Drop unnecessary checks in amd_iommu_attach_device()
  iommu: Add return errno rules to ->attach_dev ops
  iommu: Regulate errno in ->attach_dev callback functions
  iommu: Use EINVAL for incompatible device/domain in ->attach_dev

 drivers/iommu/amd/iommu.c                   | 12 ++----------
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 13 ++-----------
 drivers/iommu/arm/arm-smmu/arm-smmu.c       |  7 ++-----
 drivers/iommu/arm/arm-smmu/qcom_iommu.c     |  9 ++-------
 drivers/iommu/fsl_pamu.c                    |  6 +++---
 drivers/iommu/fsl_pamu_domain.c             |  4 ++--
 drivers/iommu/intel/iommu.c                 | 10 +++-------
 drivers/iommu/intel/pasid.c                 |  2 +-
 drivers/iommu/ipmmu-vmsa.c                  |  4 +---
 drivers/iommu/msm_iommu.c                   |  2 ++
 drivers/iommu/mtk_iommu.c                   |  9 ++++++---
 drivers/iommu/omap-iommu.c                  |  6 +++---
 drivers/iommu/rockchip-iommu.c              |  4 +++-
 drivers/iommu/sprd-iommu.c                  |  4 +---
 drivers/iommu/tegra-gart.c                  |  2 +-
 drivers/iommu/tegra-smmu.c                  |  2 +-
 drivers/iommu/virtio-iommu.c                |  6 +++---
 include/linux/iommu.h                       | 11 +++++++++++
 18 files changed, 49 insertions(+), 64 deletions(-)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-09-14 20:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13  8:24 [PATCH 0/5] iommu: Define EINVAL as device/domain incompatibility Nicolin Chen
2022-09-13  8:24 ` [PATCH 1/5] iommu/msm: Add missing __disable_clocks calls Nicolin Chen
2022-09-13  8:24 ` [PATCH 2/5] iommu/amd: Drop unnecessary checks in amd_iommu_attach_device() Nicolin Chen
2022-09-13  8:24 ` [PATCH 3/5] iommu: Add return errno rules to ->attach_dev ops Nicolin Chen
2022-09-13 18:41   ` Jeff Johnson
2022-09-13 20:00     ` Nicolin Chen
2022-09-13  8:24 ` [PATCH 4/5] iommu: Regulate errno in ->attach_dev callback functions Nicolin Chen
2022-09-13 12:27   ` Jean-Philippe Brucker
2022-09-13 20:14     ` Nicolin Chen
2022-09-14  9:11     ` Jason Gunthorpe
2022-09-14  9:49       ` Jean-Philippe Brucker
2022-09-14 17:58         ` Nicolin Chen
2022-09-14 19:53           ` Robin Murphy
2022-09-14 20:55             ` Nicolin Chen
2022-09-13  8:24 ` [PATCH 5/5] iommu: Use EINVAL for incompatible device/domain in ->attach_dev Nicolin Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).