KVM: PPC: BookE: Emulate mfspr on EPR
authorAlexander Graf <agraf@suse.de>
Fri, 4 Jan 2013 17:02:14 +0000 (18:02 +0100)
committerAlexander Graf <agraf@suse.de>
Thu, 10 Jan 2013 12:42:30 +0000 (13:42 +0100)
The EPR register is potentially valid for PR KVM as well, so we need
to emulate accesses to it. It's only defined for reading, so only
handle the mfspr case.

Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/booke_emulate.c

index 4685b8cf224959a29d1c6e774109e31f47f5c2e6..27a4b2877c10b79f6764600b01f3d196ea585fb5 100644 (file)
@@ -269,6 +269,9 @@ int kvmppc_booke_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_val)
        case SPRN_ESR:
                *spr_val = vcpu->arch.shared->esr;
                break;
+       case SPRN_EPR:
+               *spr_val = vcpu->arch.epr;
+               break;
        case SPRN_CSRR0:
                *spr_val = vcpu->arch.csrr0;
                break;