linux/arch/powerpc
Alexey Kardashevskiy f87a88642e vfio: powerpc/spapr/iommu/powernv/ioda2: Rework IOMMU ownership control
This adds tce_iommu_take_ownership() and tce_iommu_release_ownership
which call in a loop iommu_take_ownership()/iommu_release_ownership()
for every table on the group. As there is just one now, no change in
behaviour is expected.

At the moment the iommu_table struct has a set_bypass() which enables/
disables DMA bypass on IODA2 PHB. This is exposed to POWERPC IOMMU code
which calls this callback when external IOMMU users such as VFIO are
about to get over a PHB.

The set_bypass() callback is not really an iommu_table function but
IOMMU/PE function. This introduces a iommu_table_group_ops struct and
adds take_ownership()/release_ownership() callbacks to it which are
called when an external user takes/releases control over the IOMMU.

This replaces set_bypass() with ownership callbacks as it is not
necessarily just bypass enabling, it can be something else/more
so let's give it more generic name.

The callbacks is implemented for IODA2 only. Other platforms (P5IOC2,
IODA1) will use the old iommu_take_ownership/iommu_release_ownership API.
The following patches will replace iommu_take_ownership/
iommu_release_ownership calls in IODA2 with full IOMMU table release/
create.

As we here and touching bypass control, this removes
pnv_pci_ioda2_setup_bypass_pe() as it does not do much
more compared to pnv_pci_ioda2_set_bypass. This moves tce_bypass_base
initialization to pnv_pci_ioda2_setup_dma_pe.

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>
2015-06-11 15:16:47 +10:00
..
boot
configs powerpc/config: Enable bnx2x on ppc64 and pseries defconfigs 2015-06-04 22:33:27 +10:00
crypto
include vfio: powerpc/spapr/iommu/powernv/ioda2: Rework IOMMU ownership control 2015-06-11 15:16:47 +10:00
kernel vfio: powerpc/spapr/iommu/powernv/ioda2: Rework IOMMU ownership control 2015-06-11 15:16:47 +10:00
kvm powerpc/kernel: Rename PACA_DSCR to PACA_DSCR_DEFAULT 2015-06-07 19:29:00 +10:00
lib powerpc: Export __spin_yield 2015-04-21 15:21:28 +02:00
math-emu
mm powerpc/mm: Add trace point for tracking hash pte fault 2015-06-10 14:06:29 +10:00
net
oprofile powerpc/oprofile: reduce mmap_sem hold for exe_file 2015-04-17 09:04:11 -04:00
perf powerpc/perf: Fix book3s kernel to userspace backtraces 2015-06-02 13:26:38 +10:00
platforms vfio: powerpc/spapr/iommu/powernv/ioda2: Rework IOMMU ownership control 2015-06-11 15:16:47 +10:00
sysdev powerpc/iommu: Move tce_xxx callbacks from ppc_md to iommu_table 2015-06-11 15:14:56 +10:00
xmon
Kconfig powerpc updates for 4.1 2015-04-16 13:53:32 -05:00
Kconfig.debug powerpc: Make STRICT_MM_TYPECHECKS a config option 2015-05-11 19:53:59 +10:00
Makefile powerpc/configs: Replace pseries_le_defconfig with a Makefile target using merge_config 2015-06-02 16:54:49 +10:00
relocs_check.sh