diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2017-03-17 00:48:26 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-22 12:43:37 +0100 |
commit | 5d8b3e755974494296e4a2c5874c04aba9532566 (patch) | |
tree | c9b743a42eaaa565ae7b0ae0db9d265f5c20cd73 /arch/powerpc/include/asm/mmu_context.h | |
parent | 3c0cbb47a8d634978225a52764691096a7fc1468 (diff) |
vfio/spapr: Postpone allocation of userspace version of TCE table
[ Upstream commit 39701e56f5f16ea0cf8fc9e8472e645f8de91d23 ]
The iommu_table struct manages a hardware TCE table and a vmalloc'd
table with corresponding userspace addresses. Both are allocated when
the default DMA window is created and this happens when the very first
group is attached to a container.
As we are going to allow the userspace to configure container in one
memory context and pas container fd to another, we have to postpones
such allocations till a container fd is passed to the destination
user process so we would account locked memory limit against the actual
container user constrainsts.
This postpones the it_userspace array allocation till it is used first
time for mapping. The unmapping patch already checks if the array is
allocated.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/include/asm/mmu_context.h')
0 files changed, 0 insertions, 0 deletions