Commit d86be077 authored by Liu Yu's avatar Liu Yu Committed by Marcelo Tosatti

KVM: PPC E500: Add register l1csr0 emulation

Latest kernel start to access l1csr0 to contron L1.
We just tell guest no operation is on going.
Signed-off-by: default avatarLiu Yu <yu.liu@freescale.com>
Acked-by: default avatarAlexander Graf <agraf@suse.de>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent d7fa6ab2
...@@ -52,6 +52,7 @@ struct kvmppc_vcpu_e500 { ...@@ -52,6 +52,7 @@ struct kvmppc_vcpu_e500 {
u32 mas5; u32 mas5;
u32 mas6; u32 mas6;
u32 mas7; u32 mas7;
u32 l1csr0;
u32 l1csr1; u32 l1csr1;
u32 hid0; u32 hid0;
u32 hid1; u32 hid1;
......
...@@ -99,6 +99,10 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs) ...@@ -99,6 +99,10 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs)
vcpu_e500->mas6 = spr_val; break; vcpu_e500->mas6 = spr_val; break;
case SPRN_MAS7: case SPRN_MAS7:
vcpu_e500->mas7 = spr_val; break; vcpu_e500->mas7 = spr_val; break;
case SPRN_L1CSR0:
vcpu_e500->l1csr0 = spr_val;
vcpu_e500->l1csr0 &= ~(L1CSR0_DCFI | L1CSR0_CLFC);
break;
case SPRN_L1CSR1: case SPRN_L1CSR1:
vcpu_e500->l1csr1 = spr_val; break; vcpu_e500->l1csr1 = spr_val; break;
case SPRN_HID0: case SPRN_HID0:
...@@ -179,6 +183,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) ...@@ -179,6 +183,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt)
break; break;
} }
case SPRN_L1CSR0:
kvmppc_set_gpr(vcpu, rt, vcpu_e500->l1csr0); break;
case SPRN_L1CSR1: case SPRN_L1CSR1:
kvmppc_set_gpr(vcpu, rt, vcpu_e500->l1csr1); break; kvmppc_set_gpr(vcpu, rt, vcpu_e500->l1csr1); break;
case SPRN_HID0: case SPRN_HID0:
......
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