1
0
Fork 0
alistair23-linux/arch
Alexey Kardashevskiy 4793d65d1a vfio: powerpc/spapr: powerpc/powernv/ioda: Define and implement DMA windows API
This extends iommu_table_group_ops by a set of callbacks to support
dynamic DMA windows management.

create_table() creates a TCE table with specific parameters.
it receives iommu_table_group to know nodeid in order to allocate
TCE table memory closer to the PHB. The exact format of allocated
multi-level table might be also specific to the PHB model (not
the case now though).
This callback calculated the DMA window offset on a PCI bus from @num
and stores it in a just created table.

set_window() sets the window at specified TVT index + @num on PHB.

unset_window() unsets the window from specified TVT.

This adds a free() callback to iommu_table_ops to free the memory
(potentially a tree of tables) allocated for the TCE table.

create_table() and free() are supposed to be called once per
VFIO container and set_window()/unset_window() are supposed to be
called for every group in a container.

This adds IOMMU capabilities to iommu_table_group such as default
32bit window parameters and others. This makes use of new values in
vfio_iommu_spapr_tce. IODA1/P5IOC2 do not support DDW so they do not
advertise pagemasks to the userspace.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-06-11 15:16:52 +10:00
..
alpha alpha: forward declare struct pt_regs in processor.h 2015-04-17 09:03:53 -04:00
arc ARC changes for 4.1-rc1: 2015-04-24 07:55:54 -07:00
arm Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-05-10 11:16:48 -07:00
arm64 arm64: perf: Fix the pmu node name in warning message 2015-04-30 12:11:30 +01:00
avr32 Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
blackfin blackfin updates for Linux 4.1 2015-04-24 07:58:07 -07:00
c6x C6X Fixes for v4.1 2015-04-16 18:48:55 -04:00
cris CRIS changes for 4.1 2015-04-26 13:31:05 -07:00
frv Devicetree updates for 4.1: 2015-04-24 08:46:18 -07:00
hexagon Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
ia64 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
m32r m32r: make flush_cpumask non-volatile. 2015-05-09 11:09:29 -07:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2015-04-20 10:12:29 -07:00
metag Metag architecture changes for v4.1 2015-04-24 07:56:50 -07:00
microblaze microblaze: use asm-generic for seccomp.h 2015-04-17 09:04:10 -04:00
mips TTY/Serial patches for 4.1-rc1 2015-04-21 09:33:10 -07:00
mn10300 Devicetree updates for 4.1: 2015-04-24 08:46:18 -07:00
nios2 nios2 update for v4.1-rc1 2015-04-24 07:59:07 -07:00
openrisc Merge branch 'akpm' (patches from Andrew) 2015-04-15 16:39:15 -07:00
parisc parisc: Replace PT_NLEVELS with CONFIG_PGTABLE_LEVELS 2015-04-21 22:04:03 +02:00
powerpc vfio: powerpc/spapr: powerpc/powernv/ioda: Define and implement DMA windows API 2015-06-11 15:16:52 +10:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-04-28 09:58:46 -07:00
score arch: Remove exec_domain from remaining archs 2015-04-12 21:03:30 +02:00
sh Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-04-24 09:49:37 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2015-04-21 23:21:34 -07:00
tile tile: properly use node_isset() on a nodemask_t 2015-04-28 10:36:45 -04:00
um Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
unicore32 Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
x86 Power management and ACPI fixes for v4.1-rc3 2015-05-07 15:58:00 -07:00
xtensa Xtensa changes and fixes for 4.1 2015-04-17 15:32:30 -04:00
.gitignore
Kconfig powerpc updates for 4.1 2015-04-16 13:53:32 -05:00