KVM: PPC: Make BAT only guest segments work
Subsystems (3)
PATCH 1/1 KVM: PPC: Make BAT only guest segments work
When a guest sets its SR entry to invalid, we may still find a corresponding entry in a BAT. So we need to make sure we're not faulting on invalid SR entries, but instead just claim them to be BAT resolved.
This resolves breakage experienced when using libogc based guests.
--- arch/powerpc/kvm/book3s_32_mmu.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/kvm/book3s_32_mmu.c +4 -4
@@ -354,10 +354,10 @@ static int kvmppc_mmu_book3s_32_esid_to_vsid(struct kvm_vcpu *vcpu, ulong esid, *vsid =VSID_REAL_DR | gvsid;break ;case MSR_DR |MSR_IR : -if (!sr->valid) -return -1 ; - - *vsid = sr->vsid; +if (sr->valid) + *vsid = sr->vsid; +else + *vsid =VSID_BAT | gvsid;break ;default :BUG ();
Signature · 1 line
1.6.0.2
A message that is not in the archive (sent off-list or not yet received): 1277126695-32081-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org
Avi Kivity
AppliedQuoted 7 lines · Alexander Graf
When a guest sets its SR entry to invalid, we may still find a corresponding entry in a BAT. So we need to make sure we're not faulting on invalid SR entries, but instead just claim them to be BAT resolved.
This resolves breakage experienced when using libogc based guests.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function