Commit 90d34b0e authored by Scott Wood's avatar Scott Wood Committed by Avi Kivity

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: default avatarScott Wood <scottwood@freescale.com>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 2fb92db1
...@@ -43,6 +43,7 @@ struct kvmppc_vcpu_e500 { ...@@ -43,6 +43,7 @@ struct kvmppc_vcpu_e500 {
u32 host_pid[E500_PID_NUM]; u32 host_pid[E500_PID_NUM];
u32 pid[E500_PID_NUM]; u32 pid[E500_PID_NUM];
u32 svr;
u32 mas0; u32 mas0;
u32 mas1; u32 mas1;
......
...@@ -63,6 +63,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu) ...@@ -63,6 +63,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)
/* Registers init */ /* Registers init */
vcpu->arch.pvr = mfspr(SPRN_PVR); vcpu->arch.pvr = mfspr(SPRN_PVR);
vcpu_e500->svr = mfspr(SPRN_SVR);
/* Since booke kvm only support one core, update all vcpus' PIR to 0 */ /* Since booke kvm only support one core, update all vcpus' PIR to 0 */
vcpu->vcpu_id = 0; vcpu->vcpu_id = 0;
......
...@@ -175,6 +175,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) ...@@ -175,6 +175,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt)
kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid0); break; kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid0); break;
case SPRN_HID1: case SPRN_HID1:
kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid1); break; kvmppc_set_gpr(vcpu, rt, vcpu_e500->hid1); break;
case SPRN_SVR:
kvmppc_set_gpr(vcpu, rt, vcpu_e500->svr); break;
case SPRN_MMUCSR0: case SPRN_MMUCSR0:
kvmppc_set_gpr(vcpu, rt, 0); break; kvmppc_set_gpr(vcpu, rt, 0); break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment