0eaf4defc7
So far one TCE table could only be used by one IOMMU group. However IODA2 hardware allows programming the same TCE table address to multiple PE allowing sharing tables. This replaces a single pointer to a group in a iommu_table struct with a linked list of groups which provides the way of invalidating TCE cache for every PE when an actual TCE table is updated. This adds pnv_pci_link_table_and_group() and pnv_pci_unlink_table_and_group() helpers to manage the list. However without VFIO, it is still going to be a single IOMMU group per iommu_table. This changes iommu_add_device() to add a device to a first group from the group list of a table as it is only called from the platform init code or PCI bus notifier and at these moments there is only one group per table. This does not change TCE invalidation code to loop through all attached groups in order to simplify this patch and because it is not really needed in most cases. IODA2 is fixed in a later patch. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> [aw: for the vfio related changes] Acked-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
cmm.c | ||
dlpar.c | ||
dtl.c | ||
eeh_pseries.c | ||
event_sources.c | ||
firmware.c | ||
hotplug-cpu.c | ||
hotplug-memory.c | ||
hvCall.S | ||
hvCall_inst.c | ||
hvconsole.c | ||
hvcserver.c | ||
io_event_irq.c | ||
iommu.c | ||
kexec.c | ||
lpar.c | ||
lparcfg.c | ||
mobility.c | ||
msi.c | ||
nvram.c | ||
offline_states.h | ||
pci.c | ||
pci_dlpar.c | ||
power.c | ||
pseries.h | ||
pseries_energy.c | ||
ras.c | ||
reconfig.c | ||
rng.c | ||
scanlog.c | ||
setup.c | ||
smp.c | ||
suspend.c |