vfio: powerpc/spapr: Disable DMA mappings on disabled container
vfio: powerpc/spapr: Disable DMA mappings on disabled container

At the moment DMA map/unmap requests are handled irrespective to
the container's state. This allows the user space to pin memory which
it might not be allowed to pin.

This adds checks to MAP/UNMAP that the container is enabled, otherwise
-EPERM is returned.

Signed-off-by: Alexey Kardashevskiy <ac1fc56530d7d037e1ea666f130daca22d72f964@ozlabs.ru>
[aw: for the vfio related changes]
Acked-by: Alex Williamson <7469de9b95ba379e2656fa9677689657c47a7690@redhat.com>
Reviewed-by: David Gibson <aa743a0aaec8f7d7a1f01442503957f4d7a2d634@gibson.dropbear.id.au>
Reviewed-by: Gavin Shan <0398910e4f4970259b451f0f9d0686cc5e961b81@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <864f124608374e06e4da1fa5d2e47ed839b95411@ellerman.id.au>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs