]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Validate all tces before updating tables
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 10 Sep 2018 08:29:08 +0000 (18:29 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 2 Oct 2018 13:09:26 +0000 (23:09 +1000)
commitf4f905fed3a901a6ca57f20b9b019799e97b6970
tree63f4857c8f033bbe7e76576a3561c1f7962c6cdc
parentfa0a2120a0c20c2051c887184332c09725f7b74d
KVM: PPC: Validate all tces before updating tables

The KVM TCE handlers are written in a way so they fail when either
something went horribly wrong or the userspace did some obvious mistake
such as passing a misaligned address.

We are going to enhance the TCE checker to fail on attempts to map bigger
IOMMU page than the underlying pinned memory so let's valitate TCE
beforehand.

This should cause no behavioral change.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_64_vio_hv.c