KVM: PPC: Book3S HV: Create kvmppc_unmap_hpte_helper()
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 20 Dec 2016 05:49:04 +0000 (16:49 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 31 Jan 2017 10:59:50 +0000 (21:59 +1100)
commit639e459768845924705933db9142baef545ff5fc
treecc3911410230a47dcb5a7675da270d0ba1ea15ce
parentf98a8bf9ee201b7e22fc05e27150b1e481d4949f
KVM: PPC: Book3S HV: Create kvmppc_unmap_hpte_helper()

The kvm_unmap_rmapp() function, called from certain MMU notifiers, is used
to force all guest mappings of a particular host page to be set ABSENT, and
removed from the reverse mappings.

For HPT resizing, we will have some cases where we want to set just a
single guest HPTE ABSENT and remove its reverse mappings.  To prepare with
this, we split out the logic from kvm_unmap_rmapp() to evict a single HPTE,
moving it to a new helper function.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_mmu_hv.c