KVM: PPC: Book3S HV: Clear the key field of HPTE when the page is paged out
authorYongji Xie <xyjxie@linux.vnet.ibm.com>
Fri, 4 Nov 2016 05:55:11 +0000 (13:55 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 21 Nov 2016 04:17:55 +0000 (15:17 +1100)
commitf05859827d28bde311a92e0bb5c1b6a92c305442
tree43a09c5fa04ef8d2128a34dda160df08bd94bf01
parent28d057c8970d394fe048f0b2b9f203889110f165
KVM: PPC: Book3S HV: Clear the key field of HPTE when the page is paged out

Currently we mark a HPTE for emulated MMIO with HPTE_V_ABSENT bit
set as well as key 0x1f. However, those HPTEs may be conflicted with
the HPTE for real guest RAM page HPTE with key 0x1f when the page
get paged out.

This patch clears the key field of HPTE when the page is paged out,
then recover it when HPTE is re-established.

Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv_rm_mmu.c