]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S: Check KVM_CREATE_SPAPR_TCE_64 parameters
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 14 May 2018 10:00:29 +0000 (20:00 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 17 May 2018 06:41:51 +0000 (16:41 +1000)
commit3fefb2d42a8143ab842ec8fc620e82c954eee7be
tree9b49c718310ddc5d442a3c719c3541165a89253c
parent8e0be6c13963c9b045bd065e3b15852f4496df7f
KVM: PPC: Book3S: Check KVM_CREATE_SPAPR_TCE_64 parameters

Although it does not seem possible to break the host by passing bad
parameters when creating a TCE table in KVM, it is still better to get
an early clear indication of that than debugging weird effect this might
bring.

This adds some sanity checks that the page size is 4KB..16GB as this is
what the actual LoPAPR supports and that the window actually fits 64bit
space.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_vio.c