diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-11-30 17:52:01 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-12-02 14:38:30 +1100 |
commit | 39701e56f5f16ea0cf8fc9e8472e645f8de91d23 (patch) | |
tree | 5fca04d397e754bd1adc196fc660cc17dc2d1587 /drivers/block | |
parent | d7baee6901b34c4895eb78efdbf13a49079d7404 (diff) |
vfio/spapr: Postpone allocation of userspace version of TCE table
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>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions