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>
This commit is contained in:
@@ -269,7 +269,7 @@ long kvmppc_do_h_enter(struct kvm *kvm, unsigned long flags,
|
||||
if (!realmode)
|
||||
local_irq_restore(irq_flags);
|
||||
|
||||
ptel &= ~(HPTE_R_PP0 - psize);
|
||||
ptel &= HPTE_R_KEY | HPTE_R_PP0 | (psize-1);
|
||||
ptel |= pa;
|
||||
|
||||
if (pa)
|
||||
|
Reference in New Issue
Block a user