diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2023-01-23 21:24:04 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-01-23 21:24:04 +0300 |
commit | fc3873095a09ce969543fa4a17fee271c8ca3566 (patch) | |
tree | db46969d11afe94250112f72f178d6dae3bfccaa /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | b7bfaa761d760e72a969d116517eaa12e404c262 (diff) | |
parent | b062007c63eb4452f1122384e86d402531fb1d52 (diff) | |
download | linux-fc3873095a09ce969543fa4a17fee271c8ca3566.tar.xz |
Merge branch 'isolated_msi' into iommufd.git for-next
Jason Gunthorpe says:
====================
Harmonize these into a single irq_domain based check under
msi_device_has_isolated_msi().
In real HW "isolated MSI" is implemented in a few different ways:
- x86 uses "interrupt remapping" which is a block that sits between
the device and APIC, that can "remap" the MSI MemWr. AMD uses per-RID
tables to implement isolation while Intel stores the authorized RID in
each IRTE entry. Part of the remapping is discarding, HW will not
forward MSIs that don't positively match the tables.
- ARM GICv3 ITS integrates the concept of an out-of-band "device ID"
directly into the interrupt controller logic. The tables the GIC checks
that determine how to deliver the interrupt through the ITS device table
and interrupt translation tables allow limiting which interrupts device
IDs can trigger.
- S390 has unconditionally claimed it has isolated MSI through the iommu
driver. This is a weaker version of the other arches in that it only
works between "gisa" domains. See zpci_set_airq() and
https://lore.kernel.org/r/31af8174-35e9-ebeb-b9ef-74c90d4bfd93@linux.ibm.com/
After this series the "isolated MSI" is tagged based only on the
irq_domains that the interrupt travels through. For x86 enabling interrupt
remapping causes IR irq_domains to be installed in the path, and they can
carry the IRQ_DOMAIN_FLAG_ISOLATED_MSI. For ARM the GICv3 ITS itself
already sets the flag when it is running in a isolated mode, and S390
simply sets it always through an arch hook since it doesn't use
irq_domains at all.
This removes the intrusion of IRQ subsystem information into the iommu
drivers. Linux's iommu_domains abstraction has no bearing at all on the
security of MSI. Even if HW linked to the IOMMU may implement the security
on x86 implementations, Linux models that HW through the irq_domain, not
the iommu_domain.
====================
* branch 'isolated_msi':
iommu: Remove IOMMU_CAP_INTR_REMAP
irq/s390: Add arch_is_isolated_msi() for s390
iommu/x86: Replace IOMMU_CAP_INTR_REMAP with IRQ_DOMAIN_FLAG_ISOLATED_MSI
genirq/msi: Rename IRQ_DOMAIN_MSI_REMAP to IRQ_DOMAIN_ISOLATED_MSI
genirq/irqdomain: Remove unused irq_domain_check_msi_remap() code
iommufd: Convert to msi_device_has_isolated_msi()
vfio/type1: Convert to iommu_group_has_isolated_msi()
iommu: Add iommu_group_has_isolated_msi()
genirq/msi: Add msi_device_has_isolated_msi()
Link: https://lore.kernel.org/r/0-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions