[RFC PATCH kernel] KVM: PPC: Book3S PR: Fix WIMG handling under pHyp

Paul Mackerras paulus at ozlabs.org
Thu Jan 11 20:56:14 AEDT 2018


On Wed, Nov 22, 2017 at 02:42:21PM +1100, Alexey Kardashevskiy wrote:
> 96df226 "KVM: PPC: Book3S PR: Preserve storage control bits" added WIMG
> bits preserving but it missed 2 special cases:
> - a magic page in kvmppc_mmu_book3s_64_xlate() and
> - guest real mode in kvmppc_handle_pagefault().
> 
> For these ptes WIMG were 0 and pHyp failed on these causing a guest to
> stop in the very beginning at NIP=0x100 (due to bd9166ffe
> "KVM: PPC: Book3S PR: Exit KVM on failed mapping").
> 
> This initializes WIMG to non-zero value HPTE_R_M. The value is chosen
> as (0x192 & HPTE_R_WIMG); 0x192 is a magic value from
> kvmppc_mmu_map_page().
> 
> Fixes: 96df226 "KVM: PPC: Book3S PR: Preserve storage control bits"
> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>

Thanks, applied to my kvm-ppc-fixes branch, with an updated commit
message, fixes: tag, and cc:stable at vger.kernel.org.

Paul.


More information about the Linuxppc-dev mailing list