target/ppc: Add ppc_hash64_filter_pagesizes()
commit27f00f0a108484a975dc075086f8461ff279e1b3
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 26 Mar 2018 04:01:22 +0000 (26 15:01 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 22 Jun 2018 04:19:07 +0000 (22 14:19 +1000)
tree3bb7f4f1efafb7ce548ab3199207356414849875
parent123eec655287e43e0e86154e8093a394aefa3958
target/ppc: Add ppc_hash64_filter_pagesizes()

The paravirtualized PAPR platform sometimes needs to restrict the guest to
using only some of the page sizes actually supported by the host's MMU.
At the moment this is handled in KVM specific code, but for consistency we
want to apply the same limitations to all accelerators.

This makes a start on this by providing a helper function in the cpu code
to allow platform code to remove some of the cpu's page size definitions
via a caller supplied callback.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
target/ppc/mmu-hash64.c
target/ppc/mmu-hash64.h