KVM: PPC: Book3S HV: Fix setting of storage key in H_ENTER
authorRam Pai <linuxram@us.ibm.com>
Mon, 31 Jul 2017 21:39:59 +0000 (14:39 -0700)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 31 Aug 2017 02:36:44 +0000 (12:36 +1000)
commitd182b8fd6084412963cdb1a16d04c2f07234e82b
tree8490150cc9b2dea2e39b585562e2776cee303956
parent50a1a25987146c5ab15d6c1642a5043730ace0a5
KVM: PPC: Book3S HV: Fix setting of storage key in H_ENTER

In handling a H_ENTER hypercall, the code in kvmppc_do_h_enter
clobbers the high-order two bits of the storage key, which is stored
in a split field in the second doubleword of the HPTE.  Any storage
key number above 7 hence fails to operate correctly.

This makes sure we preserve all the bits of the storage key.

Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/book3s/64/mmu-hash.h
arch/powerpc/kvm/book3s_hv_rm_mmu.c