KVM: PPC: Book3S HV: Put huge-page HPTEs in rmap chain for base address
authorPaul Mackerras <paulus@samba.org>
Mon, 26 May 2014 09:48:37 +0000 (19:48 +1000)
committerAlexander Graf <agraf@suse.de>
Fri, 30 May 2014 12:26:28 +0000 (14:26 +0200)
commit1066f7724c73fca9ddb978c7f5b7411c54032047
tree718243e1a2afa0c6df2eb77fee8c3fab6d494f51
parent55765483e1df8135102ae9ca77dccbca9a7a6184
KVM: PPC: Book3S HV: Put huge-page HPTEs in rmap chain for base address

Currently, when a huge page is faulted in for a guest, we select the
rmap chain to insert the HPTE into based on the guest physical address
that the guest tried to access.  Since there is an rmap chain for each
system page, there are many rmap chains for the area covered by a huge
page (e.g. 256 for 16MB pages when PAGE_SIZE = 64kB), and the huge-page
HPTE could end up in any one of them.

For consistency, and to make the huge-page HPTEs easier to find, we now
put huge-page HPTEs in the rmap chain corresponding to the base address
of the huge page.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_64_mmu_hv.c