summaryrefslogtreecommitdiffstats
path: root/block/Makefile
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2023-03-06 18:30:20 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2023-03-14 13:36:27 +0100
commit9d67c94335096311c0bc7556ad1022de7385790b (patch)
tree818fb720dc6b4700345e0096fc09c85e8bc5d9fe /block/Makefile
parentLinux 6.3-rc2 (diff)
downloadlinux-9d67c94335096311c0bc7556ad1022de7385790b.tar.xz
linux-9d67c94335096311c0bc7556ad1022de7385790b.zip
powerpc/iommu: Add "borrowing" iommu_table_group_ops
PPC64 IOMMU API defines iommu_table_group_ops which handles DMA windows for PEs: control the ownership, create/set/unset a table the hardware for dynamic DMA windows (DDW). VFIO uses the API to implement support on POWER. So far only PowerNV IODA2 (POWER8 and newer machines) implemented this and other cases (POWER7 or nested KVM) did not and instead reused existing iommu_table structs. This means 1) no DDW 2) ownership transfer is done directly in the VFIO SPAPR TCE driver. Soon POWER is going to get its own iommu_ops and ownership control is going to move there. This implements spapr_tce_table_group_ops which borrows iommu_table tables. The upside is that VFIO needs to know less about POWER. The new ops returns the existing table from create_table() and only checks if the same window is already set. This is only going to work if the default DMA window starts table_group.tce32_start and as big as pe->table_group.tce32_size (not the case for IODA2+ PowerNV). This changes iommu_table_group_ops::take_ownership() to return an error if borrowing a table failed. This should not cause any visible change in behavior for PowerNV. pSeries was not that well tested/supported anyway. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> [mpe: Fix CONFIG_IOMMU_API=n build (skiroot_defconfig), & formatting] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/525438831.16998517.1678123820075.JavaMail.zimbra@raptorengineeringinc.com
Diffstat (limited to 'block/Makefile')
0 files changed, 0 insertions, 0 deletions