KVM: PPC: Book3S: Allow backing bigger guest IOMMU pages with smaller physical pages
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 14 May 2018 10:00:28 +0000 (20:00 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 17 May 2018 06:41:51 +0000 (16:41 +1000)
commitca1fc489cfa06a554fd71eb46d8927614ec7e6f3
treeb94c12c7060fed20667df64963b656005032b5e2
parentc6b61661d229e42b58d5e511191e925d105a5cce
KVM: PPC: Book3S: Allow backing bigger guest IOMMU pages with smaller physical pages

At the moment we only support in the host the IOMMU page sizes which
the guest is aware of, which is 4KB/64KB/16MB. However P9 does not support
16MB IOMMU pages, 2MB and 1GB pages are supported instead. We can still
emulate bigger guest pages (for example 16MB) with smaller host pages
(4KB/64KB/2MB).

This allows the physical IOMMU pages to use a page size smaller or equal
than the guest visible IOMMU page size.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_64_vio_hv.c