aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/kvm/book3s_32_mmu.c
diff options
context:
space:
mode:
authorAlexander Graf <[email protected]>2010-06-21 15:24:55 +0200
committerAvi Kivity <[email protected]>2010-08-01 10:47:14 +0300
commit4d29bdbf12f35f7e7816d67e99c150630684604f (patch)
tree2eb8955ba34b720004e959642fca355dd9b67fa3 /arch/powerpc/kvm/book3s_32_mmu.c
parentKVM: PPC: Use kernel hash function (diff)
downloadwireguard-linux-4d29bdbf12f35f7e7816d67e99c150630684604f.tar.xz
wireguard-linux-4d29bdbf12f35f7e7816d67e99c150630684604f.zip
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. Signed-off-by: Alexander Graf <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
Diffstat (limited to 'arch/powerpc/kvm/book3s_32_mmu.c')
-rw-r--r--arch/powerpc/kvm/book3s_32_mmu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kvm/book3s_32_mmu.c b/arch/powerpc/kvm/book3s_32_mmu.c
index 0b10503c8a4a..3292d76101d2 100644
--- a/arch/powerpc/kvm/book3s_32_mmu.c
+++ b/arch/powerpc/kvm/book3s_32_mmu.c
@@ -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();
OSZAR »