diff options
author | Liu Yu <yu.liu@freescale.com> | 2009-06-05 02:54:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:32:47 -0400 |
commit | 06579dd9c12f36ac575460a226d2020d84a0128b (patch) | |
tree | 78f381476d7ff904ce124de47bb1244234bfb92f | |
parent | 5b7c1a2c17e77cd5416755bb9ac63278996f6c51 (diff) |
KVM: ppc: e500: Add MMUCFG and PVR emulation
Latest kernel started to use these two registers.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/powerpc/kvm/e500_emulate.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kvm/emulate.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c index 3f760414b9f8..be95b8d8e3b7 100644 --- a/arch/powerpc/kvm/e500_emulate.c +++ b/arch/powerpc/kvm/e500_emulate.c | |||
@@ -180,6 +180,9 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) | |||
180 | case SPRN_MMUCSR0: | 180 | case SPRN_MMUCSR0: |
181 | vcpu->arch.gpr[rt] = 0; break; | 181 | vcpu->arch.gpr[rt] = 0; break; |
182 | 182 | ||
183 | case SPRN_MMUCFG: | ||
184 | vcpu->arch.gpr[rt] = mfspr(SPRN_MMUCFG); break; | ||
185 | |||
183 | /* extra exceptions */ | 186 | /* extra exceptions */ |
184 | case SPRN_IVOR32: | 187 | case SPRN_IVOR32: |
185 | vcpu->arch.gpr[rt] = vcpu->arch.ivor[BOOKE_IRQPRIO_SPE_UNAVAIL]; | 188 | vcpu->arch.gpr[rt] = vcpu->arch.ivor[BOOKE_IRQPRIO_SPE_UNAVAIL]; |
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index f8b8248cb9b0..28a8237fe78b 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -188,6 +188,8 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
188 | vcpu->arch.gpr[rt] = vcpu->arch.srr1; break; | 188 | vcpu->arch.gpr[rt] = vcpu->arch.srr1; break; |
189 | case SPRN_PVR: | 189 | case SPRN_PVR: |
190 | vcpu->arch.gpr[rt] = mfspr(SPRN_PVR); break; | 190 | vcpu->arch.gpr[rt] = mfspr(SPRN_PVR); break; |
191 | case SPRN_PIR: | ||
192 | vcpu->arch.gpr[rt] = mfspr(SPRN_PIR); break; | ||
191 | 193 | ||
192 | /* Note: mftb and TBRL/TBWL are user-accessible, so | 194 | /* Note: mftb and TBRL/TBWL are user-accessible, so |
193 | * the guest can always access the real TB anyways. | 195 | * the guest can always access the real TB anyways. |