IOMMU Fixes for Linux v6.10-rc5
Including: - Two cache flushing fixes for Intel and AMD drivers - AMD guest translation enabling fix - Update IOMMU tree location in MAINTAINERS file -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmZ+rksACgkQK/BELZcB GuNDBg/+P3yCBVceEUsKpe584bUQpTs2X3M58X9ZKUEosEyjyLd24WnpW1yzdJqz 6kbxDNCIVsde2eSVtw7fNkW7wBdj4nZ4KB8y9jfrGjpDiQczNp2zG3+z53uFfWR+ rt2WnTD/Q+a59AgLBz2v8/tdczttNAgwQZu+H/rdQg4/Q55mtJoeCwU5DT5a5Ab4 VfQSnOPHRm21GIewP9cbZoeTdOjRhE08/eszFpMQxApi20/MC67SYoUJBdUCjjLl kIqogI9CvB6vjiPuziWpnoFoRj0YDZKwzXKlJvZthHbFdSglEpCprNs2JlnW6kA7 P9PIJrMCOAILNX9Cgmw2GVklTdLPUpRQw4chSdkZo8PVxECLozLQyBwmkI6Ic1AL BkTPfRWbYkcja0n+y24xogeETTwnl/g6RWiori3B3aMyRzOfvfnGg9jqbtBG0s54 fRNGyr+dg8Iu27uvwkx4tk6LfO5mIp8YTrpXeRsbEOoD0NwwgBhxAMg9y/nivBh2 y7o3uDYC/N9xsYJb+WHDa1sqF8fC9IB8b87VG3KxgWHd63g4WzEvMN/mRcmltRjL XkyNDYXOZE1oY+/Dh+H/TNUR9C7ErrIg17c7wRTRN8bxNENTjkFN5wUgxdZAcLIA c6SNvwMMwMO79ymvuI1USRYeOAWd8McS82AwOHU8qVdupol0xQo= =iidU -----END PGP SIGNATURE----- Merge tag 'iommu-fixes-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: - Two cache flushing fixes for Intel and AMD drivers - AMD guest translation enabling fix - Update IOMMU tree location in MAINTAINERS file * tag 'iommu-fixes-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: MAINTAINERS: Update IOMMU tree location iommu/amd: Fix GT feature enablement again iommu/vt-d: Fix missed device TLB cache tag iommu/amd: Invalidate cache before removing device from domain list
This commit is contained in:
commit
a2316dda07
@ -1044,7 +1044,7 @@ M: Joerg Roedel <joro@8bytes.org>
|
||||
R: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
|
||||
L: iommu@lists.linux.dev
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
|
||||
F: drivers/iommu/amd/
|
||||
F: include/linux/amd-iommu.h
|
||||
|
||||
@ -11157,7 +11157,7 @@ M: David Woodhouse <dwmw2@infradead.org>
|
||||
M: Lu Baolu <baolu.lu@linux.intel.com>
|
||||
L: iommu@lists.linux.dev
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
|
||||
F: drivers/iommu/intel/
|
||||
|
||||
INTEL IPU3 CSI-2 CIO2 DRIVER
|
||||
@ -11530,7 +11530,7 @@ IOMMU DMA-API LAYER
|
||||
M: Robin Murphy <robin.murphy@arm.com>
|
||||
L: iommu@lists.linux.dev
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
|
||||
F: drivers/iommu/dma-iommu.c
|
||||
F: drivers/iommu/dma-iommu.h
|
||||
F: drivers/iommu/iova.c
|
||||
@ -11542,7 +11542,7 @@ M: Will Deacon <will@kernel.org>
|
||||
R: Robin Murphy <robin.murphy@arm.com>
|
||||
L: iommu@lists.linux.dev
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
|
||||
F: Documentation/devicetree/bindings/iommu/
|
||||
F: Documentation/userspace-api/iommu.rst
|
||||
F: drivers/iommu/
|
||||
|
@ -2743,6 +2743,7 @@ static void early_enable_iommu(struct amd_iommu *iommu)
|
||||
iommu_enable_command_buffer(iommu);
|
||||
iommu_enable_event_buffer(iommu);
|
||||
iommu_set_exclusion_range(iommu);
|
||||
iommu_enable_gt(iommu);
|
||||
iommu_enable_ga(iommu);
|
||||
iommu_enable_xt(iommu);
|
||||
iommu_enable_irtcachedis(iommu);
|
||||
|
@ -2061,6 +2061,12 @@ static void do_detach(struct iommu_dev_data *dev_data)
|
||||
struct protection_domain *domain = dev_data->domain;
|
||||
struct amd_iommu *iommu = get_amd_iommu_from_dev_data(dev_data);
|
||||
|
||||
/* Clear DTE and flush the entry */
|
||||
amd_iommu_dev_update_dte(dev_data, false);
|
||||
|
||||
/* Flush IOTLB and wait for the flushes to finish */
|
||||
amd_iommu_domain_flush_all(domain);
|
||||
|
||||
/* Clear GCR3 table */
|
||||
if (pdom_is_sva_capable(domain))
|
||||
destroy_gcr3_table(dev_data, domain);
|
||||
@ -2069,12 +2075,6 @@ static void do_detach(struct iommu_dev_data *dev_data)
|
||||
dev_data->domain = NULL;
|
||||
list_del(&dev_data->list);
|
||||
|
||||
/* Clear DTE and flush the entry */
|
||||
amd_iommu_dev_update_dte(dev_data, false);
|
||||
|
||||
/* Flush IOTLB and wait for the flushes to finish */
|
||||
amd_iommu_domain_flush_all(domain);
|
||||
|
||||
/* decrease reference counters - needs to happen after the flushes */
|
||||
domain->dev_iommu[iommu->index] -= 1;
|
||||
domain->dev_cnt -= 1;
|
||||
|
@ -2114,12 +2114,6 @@ static int dmar_domain_attach_device(struct dmar_domain *domain,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = cache_tag_assign_domain(domain, dev, IOMMU_NO_PASID);
|
||||
if (ret) {
|
||||
domain_detach_iommu(domain, iommu);
|
||||
return ret;
|
||||
}
|
||||
|
||||
info->domain = domain;
|
||||
spin_lock_irqsave(&domain->lock, flags);
|
||||
list_add(&info->link, &domain->devices);
|
||||
@ -2137,15 +2131,21 @@ static int dmar_domain_attach_device(struct dmar_domain *domain,
|
||||
else
|
||||
ret = intel_pasid_setup_second_level(iommu, domain, dev, IOMMU_NO_PASID);
|
||||
|
||||
if (ret) {
|
||||
device_block_translation(dev);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
goto out_block_translation;
|
||||
|
||||
if (sm_supported(info->iommu) || !domain_type_is_si(info->domain))
|
||||
iommu_enable_pci_caps(info);
|
||||
|
||||
ret = cache_tag_assign_domain(domain, dev, IOMMU_NO_PASID);
|
||||
if (ret)
|
||||
goto out_block_translation;
|
||||
|
||||
return 0;
|
||||
|
||||
out_block_translation:
|
||||
device_block_translation(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user