[GIT PULL] Please pull IOMMUFD subsystem changes
From: Jason Gunthorpe
Date: Tue Feb 21 2023 - 10:41:02 EST
Hi Linus,
This PR has a few smaller updates related to iommufd. Several big topics are
currently still on the mailing list in review:
- VFIO device cdev support to allow exposing all the iommufd features:
https://lore.kernel.org/kvm/20230221034812.138051-1-yi.l.liu@xxxxxxxxx/
- iommufd page table replace operation:
https://lore.kernel.org/kvm/cover.1675802050.git.nicolinc@xxxxxxxxxx/
- IOMMU driver information query:
https://lore.kernel.org/r/20230209041642.9346-1-yi.l.liu@xxxxxxxxx
- Intel VT-d nested translation:
https://lore.kernel.org/r/20230209043153.14964-1-yi.l.liu@xxxxxxxxx
- Draft patches for ARM SMMUv3 nested translation:
https://github.com/nicolinc/iommufd/commits/wip/iommufd-v6.2-rc5-nesting
Along with qemu patches implementing iommufd:
https://lore.kernel.org/qemu-devel/20230131205305.2726330-1-eric.auger@xxxxxxxxxx/
And draft patches for the qemu side support for nested translation.
This PR has a shared branch with Joerg's tree changing the signature of
iommu_map() to add a gfp_t. There were some conflicts with v6.2 which I've
resolved in this PR and there will be a conflict against the rpmsg tree:
https://lore.kernel.org/r/20230127180226.783baf07@xxxxxxxxxxxxxxxx
--- a/drivers/remoteproc/qcom_q6v5_adsp.c
+++ b/drivers/remoteproc/qcom_q6v5_adsp.c
@@ -367,7 +367,8 @@ static int adsp_map_carveout(struct rproc *rproc)
iova = adsp->mem_phys | (sid << 32);
ret = iommu_map(rproc->domain, iova, adsp->mem_phys,
- adsp->mem_size, IOMMU_READ | IOMMU_WRITE);
+ adsp->mem_size, IOMMU_READ | IOMMU_WRITE,
+ GFP_KERNEL);
if (ret) {
dev_err(adsp->dev, "Unable to map ADSP Physical Memory\n");
return ret;
Thanks,
Jason
The following changes since commit c9c3395d5e3dcc6daee66c6908354d47bf98cb0c:
Linux 6.2 (2023-02-19 14:24:22 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git tags/for-linus-iommufd
for you to fetch changes up to 939204e4df962982cbc84acc26b29b421dd530a8:
Merge tag 'v6.2' into iommufd.git for-next (2023-02-21 11:11:03 -0400)
----------------------------------------------------------------
iommufd for 6.3
Some polishing and small fixes for iommufd:
- Remove IOMMU_CAP_INTR_REMAP, instead rely on the interrupt subsystem
- Use GFP_KERNEL_ACCOUNT inside the iommu_domains
- Support VFIO_NOIOMMU mode with iommufd
- Various typos
- A list corruption bug if HWPTs are used for attach
----------------------------------------------------------------
Jason Gunthorpe (26):
genirq/msi: Add msi_device_has_isolated_msi()
iommu: Add iommu_group_has_isolated_msi()
vfio/type1: Convert to iommu_group_has_isolated_msi()
iommufd: Convert to msi_device_has_isolated_msi()
genirq/irqdomain: Remove unused irq_domain_check_msi_remap() code
genirq/msi: Rename IRQ_DOMAIN_MSI_REMAP to IRQ_DOMAIN_ISOLATED_MSI
iommu/x86: Replace IOMMU_CAP_INTR_REMAP with IRQ_DOMAIN_FLAG_ISOLATED_MSI
irq/s390: Add arch_is_isolated_msi() for s390
iommu: Remove IOMMU_CAP_INTR_REMAP
Merge branch 'isolated_msi' into iommufd.git for-next
iommu: Add a gfp parameter to iommu_map()
iommu: Remove iommu_map_atomic()
iommu: Add a gfp parameter to iommu_map_sg()
iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous()
iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map()
iommu/intel: Add a gfp parameter to alloc_pgtable_page()
iommu/intel: Support the gfp argument to the map_pages op
iommu/intel: Use GFP_KERNEL in sleepable contexts
iommu/s390: Push the gfp parameter to the kmem_cache_alloc()'s
iommu/s390: Use GFP_KERNEL in sleepable contexts
Merge branch 'iommu-memory-accounting' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joro/iommu intoiommufd/for-next
vfio: Support VFIO_NOIOMMU with iommufd
Merge branch 'vfio-no-iommu' into iommufd.git for-next
iommufd: Make sure to zero vfio_iommu_type1_info before copying to user
iommufd: Do not add the same hwpt to the ioas->hwpt_list twice
Merge tag 'v6.2' into iommufd.git for-next
Nicolin Chen (1):
selftests: iommu: Fix test_cmd_destroy_access() call in user_copy
Yi Liu (1):
iommufd: Add three missing structures in ucmd_buffer
arch/arm/mm/dma-mapping.c | 11 ++-
arch/s390/include/asm/msi.h | 17 ++++
arch/s390/include/asm/pci_dma.h | 5 +-
arch/s390/pci/pci_dma.c | 31 +++---
.../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 3 +-
drivers/gpu/drm/tegra/drm.c | 2 +-
drivers/gpu/host1x/cdma.c | 2 +-
drivers/infiniband/hw/usnic/usnic_uiom.c | 8 +-
drivers/iommu/amd/iommu.c | 5 +-
drivers/iommu/dma-iommu.c | 18 +++-
drivers/iommu/intel/iommu.c | 38 ++++----
drivers/iommu/intel/iommu.h | 2 +-
drivers/iommu/intel/irq_remapping.c | 3 +-
drivers/iommu/intel/pasid.c | 2 +-
drivers/iommu/iommu.c | 77 ++++++++-------
drivers/iommu/iommufd/Kconfig | 2 +-
drivers/iommu/iommufd/device.c | 8 +-
drivers/iommu/iommufd/iommufd_private.h | 2 +
drivers/iommu/iommufd/main.c | 3 +
drivers/iommu/iommufd/pages.c | 6 +-
drivers/iommu/iommufd/vfio_compat.c | 107 +++++++++++++++++----
drivers/iommu/s390-iommu.c | 17 ++--
drivers/irqchip/irq-gic-v3-its.c | 4 +-
drivers/media/platform/qcom/venus/firmware.c | 2 +-
drivers/net/ipa/ipa_mem.c | 6 +-
drivers/net/wireless/ath/ath10k/snoc.c | 2 +-
drivers/net/wireless/ath/ath11k/ahb.c | 4 +-
drivers/remoteproc/remoteproc_core.c | 5 +-
drivers/vfio/Kconfig | 2 +-
drivers/vfio/container.c | 7 --
drivers/vfio/group.c | 7 +-
drivers/vfio/iommufd.c | 19 +++-
drivers/vfio/vfio.h | 8 +-
drivers/vfio/vfio_iommu_type1.c | 25 ++---
drivers/vfio/vfio_main.c | 7 ++
drivers/vhost/vdpa.c | 2 +-
include/linux/iommu.h | 33 ++-----
include/linux/iommufd.h | 12 ++-
include/linux/irqdomain.h | 29 +-----
include/linux/msi.h | 17 ++++
kernel/irq/irqdomain.c | 39 --------
kernel/irq/msi.c | 27 ++++++
tools/testing/selftests/iommu/iommufd.c | 2 +-
43 files changed, 369 insertions(+), 259 deletions(-)
create mode 100644 arch/s390/include/asm/msi.h
Attachment:
signature.asc
Description: PGP signature