diff options
author | Scott Wood <scottwood@freescale.com> | 2011-03-29 17:49:10 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-22 08:47:46 -0400 |
commit | 90d34b0e45df3bfe522e9e9d604c4c1a0253699d (patch) | |
tree | 19a00d6e110b9d4e561c90858d2e07d98b87bf40 /arch | |
parent | 2fb92db1ec08f3235c500e7f460eeb78092d844e (diff) |
KVM: PPC: e500: emulate SVR
Return the actual host SVR for now, as we already do for PVR. Eventually
we may support Qemu overriding PVR/SVR if the situation is appropriate,
once we implement KVM_SET_SREGS on e500.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/kvm_e500.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/e500.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/e500_emulate.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_e500.h b/arch/powerpc/include/asm/kvm_e500.h index 7fea26fffb25..bb2a0890600f 100644 --- a/arch/powerpc/include/asm/kvm_e500.h +++ b/arch/powerpc/include/asm/kvm_e500.h | |||
@@ -43,6 +43,7 @@ struct kvmppc_vcpu_e500 { | |||
43 | 43 | ||
44 | u32 host_pid[E500_PID_NUM]; | 44 | u32 host_pid[E500_PID_NUM]; |
45 | u32 pid[E500_PID_NUM]; | 45 | u32 pid[E500_PID_NUM]; |
46 | u32 svr; | ||
46 | 47 | ||
47 | u32 mas0; | 48 | u32 mas0; |
48 | u32 mas1; | 49 | u32 mas1; |
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index e3768ee9b595..0c1af1267843 100644 --- a/arch/powerpc/kvm/e500.c +++ b/arch/powerpc/kvm/e500.c | |||
@@ -63,6 +63,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu) | |||
63 | 63 | ||
64 | /* Registers init */ | 64 | /* Registers init */ |
65 | vcpu->arch.pvr = mfspr(SPRN_PVR); | 65 | vcpu->arch.pvr = mfspr(SPRN_PVR); |
66 | vcpu_e500->svr = mfspr(SPRN_SVR); | ||
66 | 67 | ||
67 | /* Since booke kvm only support one core, update all vcpus' PIR to 0 */ | 68 | /* Since booke kvm only support one core, update all vcpus' PIR to 0 */ |
68 | vcpu->vcpu_id = 0; | 69 | vcpu->vcpu_id = 0; |
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c index 8e3edfbc9634..e2fb47f035a5 100644 --- a/arch/powerpc/kvm/e500_emulate.c +++ b/arch/powerpc/kvm/e500_emulate.c | |||
@@ -175,6 +175,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) | |||
175 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid0); break; | 175 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid0); break; |
176 | case SPRN_HID1: | 176 | case SPRN_HID1: |
177 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid1); break; | 177 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid1); break; |
178 | case SPRN_SVR: | ||
179 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->svr); break; | ||
178 | 180 | ||
179 | case SPRN_MMUCSR0: | 181 | case SPRN_MMUCSR0: |
180 | kvmppc_set_gpr(vcpu, rt, 0); break; | 182 | kvmppc_set_gpr(vcpu, rt, 0); break; |