mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 19:24:02 +08:00
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 <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
3b249157c0
commit
4d29bdbf12
@ -354,10 +354,10 @@ static int kvmppc_mmu_book3s_32_esid_to_vsid(struct kvm_vcpu *vcpu, ulong esid,
|
|||||||
*vsid = VSID_REAL_DR | gvsid;
|
*vsid = VSID_REAL_DR | gvsid;
|
||||||
break;
|
break;
|
||||||
case MSR_DR|MSR_IR:
|
case MSR_DR|MSR_IR:
|
||||||
if (!sr->valid)
|
if (sr->valid)
|
||||||
return -1;
|
*vsid = sr->vsid;
|
||||||
|
else
|
||||||
*vsid = sr->vsid;
|
*vsid = VSID_BAT | gvsid;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG();
|
BUG();
|
||||||
|
Loading…
Reference in New Issue
Block a user