On 22.11.17 04:42, 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@xxxxxxxxx> > --- > > This indeed fixes PR KVM + VFIO under pHyp but selection of HPTE_R_M > is arguable. This does indeed fix the breakage we've seen: Tested-by: Ruediger Oertel <ro@xxxxxxx> Alex