vsva patches
Jason Gunthorpe (58): iommu/arm-smmu-v3: Make STE programming independent of the callers iommu/arm-smmu-v3: Consolidate the STE generation for abort/bypass iommu/arm-smmu-v3: Move the STE generation for S1 and S2 domains into functions iommu/arm-smmu-v3: Build the whole STE in arm_smmu_make_s2_domain_ste() iommu/arm-smmu-v3: Hold arm_smmu_asid_lock during all of attach_dev iommu/arm-smmu-v3: Compute the STE only once for each master iommu/arm-smmu-v3: Do not change the STE twice during arm_smmu_attach_dev() iommu/arm-smmu-v3: Put writing the context descriptor in the right order iommu/arm-smmu-v3: Pass smmu_domain to arm_enable/disable_ats() iommu/arm-smmu-v3: Remove arm_smmu_master->domain iommu/arm-smmu-v3: Check that the RID domain is S1 in SVA iommu/arm-smmu-v3: Add a global static IDENTITY domain iommu/arm-smmu-v3: Add a global static BLOCKED domain iommu/arm-smmu-v3: Use the identity/blocked domain during release iommu/arm-smmu-v3: Pass arm_smmu_domain and arm_smmu_device to finalize iommu/arm-smmu-v3: Convert to domain_alloc_paging() iommu/arm-smmu-v3: Add cpu_to_le64() around STRTAB_STE_0_V iommu/arm-smmu-v3: Do not allow a SVA domain to be set on the wrong PASID iommu/arm-smmu-v3: Do not ATC invalidate the entire domain iommu/arm-smmu-v3: Add a type for the CD entry iommu/arm-smmu-v3: Add an ops indirection to the STE code iommu/arm-smmu-v3: Make CD programming use arm_smmu_write_entry() iommu/arm-smmu-v3: Consolidate clearing a CD table entry iommu/arm-smmu-v3: Move the CD generation for S1 domains into a function iommu/arm-smmu-v3: Move allocation of the cdtable into arm_smmu_get_cd_ptr() iommu/arm-smmu-v3: Allocate the CD table entry in advance iommu/arm-smmu-v3: Move the CD generation for SVA into a function iommu/arm-smmu-v3: Build the whole CD in arm_smmu_make_s1_cd() iommu/arm-smmu-v3: Start building a generic PASID layer iommu/arm-smmu-v3: Make smmu_domain->devices into an allocated list iommu/arm-smmu-v3: Make changing domains be hitless for ATS iommu/arm-smmu-v3: Add ssid to struct arm_smmu_master_domain iommu/arm-smmu-v3: Keep track of valid CD entries in the cd_table iommu/arm-smmu-v3: Thread SSID through the arm_smmu_attach_*() interface iommu/arm-smmu-v3: Make SVA allocate a normal arm_smmu_domain iommu/arm-smmu-v3: Keep track of arm_smmu_master_domain for SVA iommu: Add ops->domain_alloc_sva() iommu/arm-smmu-v3: Put the SVA mmu notifier in the smmu_domain iommu/arm-smmu-v3: Consolidate freeing the ASID/VMID iommu/arm-smmu-v3: Move the arm_smmu_asid_xa to per-smmu like vmid iommu/arm-smmu-v3: Bring back SVA BTM support iommu/arm-smmu-v3: Allow IDENTITY/BLOCKED to be set while PASID is used iommu/arm-smmu-v3: Allow a PASID to be set when RID is IDENTITY/BLOCKED iommu/arm-smmu-v3: Allow setting a S1 domain to a PASID iommu/arm-smmu-v3: Split struct arm_smmu_strtab_cfg.strtab iommu/arm-smmu-v3: Split struct arm_smmu_ctx_desc_cfg.cdtab iommu/arm-smmu-v3: Do not use devm for the cd table allocations iommu/arm-smmu-v3: Remove arm_smmu_ctx_desc & arm_smmu_s2_cfg iommu/arm-smmu-v3: Consolidate cache tag allocation iommu/arm-smmu-v3: Replace arm_smmu_tlb_inv_asid with arm_smmu_tlb_inv_all_s1 iommu/arm-smmu-v3: Create arm_smmu_tlb_inv_range_s1() iommu/arm-smmu-v3: Make arm_smmu_tlb_inv_range_s2() iommu/arm-smmu-v3: Add the limit logic to arm_smmu_tlb_inv_range_s2() vfio: Remove VFIO_TYPE1_NESTING_IOMMU iommu/arm-smmu-v3: Implement IOMMU_HWPT_ALLOC_NEST_PARENT iommu/arm-smmu-v3: Support IOMMU_DOMAIN_NESTED iommu/arm-smmu-v3: Add unit tests for arm_smmu_write_entry iommu/arm-smmu-v3: Use the new rb tree helpers
Liu Yi L (2): vfio/pci: Emulate PASID/PRI capability for VFs vfio/pci: Expose PCIe PASID capability to userspace
Lu Baolu (8): iommu: Add iopf domain attach/detach/replace interface iommu/sva: Use iopf domain attach/detach interface iommufd: Add fault and response message definitions iommufd: Add iommufd fault object iommufd: Associate fault object with iommufd_hw_pgtable iommufd: IOPF-capable hw page table attach/detach/replace iommufd/selftest: Add IOPF support for mock device iommufd/selftest: Add coverage for IOPF test
Nicolin Chen (7): iommu/arm-smmu-v3: Support IOMMU_GET_HW_INFO via struct arm_smmu_hw_info iommu/arm-smmu-v3: Implement arm_smmu_get_msi_mapping_domain iommu/arm-smmu-v3: Add CMDQ_OP_TLBI_NH_VAA and CMDQ_OP_TLBI_NH_ALL iommu/arm-smmu-v3: Add a helper queue_ncmds iommu/arm-smmu-v3: Link user SID and physical SID iommu/arm-smmu-v3: Add arm_smmu_cache_invalidate_user Hack: iommu/arm-smmu-v3: Enable ATS for identity domains
Robin Murphy (1): iommu/dma: Support MSIs through nested domains
Shameer Kolothum (1): vfio/pci: Fix for wrong CAP IDs
drivers/iommu/Kconfig | 12 +- drivers/iommu/arm/arm-smmu-v3/Makefile | 2 + .../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 658 +++-- .../iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 423 +++ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2305 ++++++++++++----- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 183 +- drivers/iommu/arm/arm-smmu/arm-smmu.c | 16 - drivers/iommu/dma-iommu.c | 18 +- drivers/iommu/io-pgfault.c | 215 +- drivers/iommu/iommu-sva.c | 63 +- drivers/iommu/iommu.c | 10 - drivers/iommu/iommufd/Makefile | 1 + drivers/iommu/iommufd/device.c | 16 +- drivers/iommu/iommufd/fault.c | 391 +++ drivers/iommu/iommufd/hw_pagetable.c | 36 +- drivers/iommu/iommufd/iommufd_private.h | 41 + drivers/iommu/iommufd/iommufd_test.h | 8 + drivers/iommu/iommufd/main.c | 6 + drivers/iommu/iommufd/selftest.c | 63 + drivers/iommu/iommufd/vfio_compat.c | 7 +- drivers/vfio/pci/vfio_pci_config.c | 325 ++- drivers/vfio/vfio_iommu_type1.c | 12 +- include/linux/iommu.h | 50 +- include/uapi/linux/iommufd.h | 166 ++ include/uapi/linux/vfio.h | 2 +- tools/testing/selftests/iommu/iommufd.c | 17 + .../selftests/iommu/iommufd_fail_nth.c | 2 +- tools/testing/selftests/iommu/iommufd_utils.h | 83 +- 28 files changed, 3925 insertions(+), 1206 deletions(-) create mode 100644 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c create mode 100644 drivers/iommu/iommufd/fault.c