diff options
author | Liu Yu <yu.liu@freescale.com> | 2010-01-22 05:50:29 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:36:05 -0500 |
commit | d86be077a4d62e5615e97674dab8d894ce582b09 (patch) | |
tree | 15f84f49b54c3bef6e22c1c72e6138a2d7d4ebc6 | |
parent | d7fa6ab217aeed26293e01d7b64f79a1ac57e823 (diff) |
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: Liu Yu <yu.liu@freescale.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r-- | arch/powerpc/include/asm/kvm_e500.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/e500_emulate.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_e500.h b/arch/powerpc/include/asm/kvm_e500.h index 9d497ce49726..569dfd31ee79 100644 --- a/arch/powerpc/include/asm/kvm_e500.h +++ b/arch/powerpc/include/asm/kvm_e500.h | |||
@@ -52,6 +52,7 @@ struct kvmppc_vcpu_e500 { | |||
52 | u32 mas5; | 52 | u32 mas5; |
53 | u32 mas6; | 53 | u32 mas6; |
54 | u32 mas7; | 54 | u32 mas7; |
55 | u32 l1csr0; | ||
55 | u32 l1csr1; | 56 | u32 l1csr1; |
56 | u32 hid0; | 57 | u32 hid0; |
57 | u32 hid1; | 58 | u32 hid1; |
diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c index 7644f7a9bac3..95f8ec8fdc71 100644 --- a/arch/powerpc/kvm/e500_emulate.c +++ b/arch/powerpc/kvm/e500_emulate.c | |||
@@ -99,6 +99,10 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs) | |||
99 | vcpu_e500->mas6 = spr_val; break; | 99 | vcpu_e500->mas6 = spr_val; break; |
100 | case SPRN_MAS7: | 100 | case SPRN_MAS7: |
101 | vcpu_e500->mas7 = spr_val; break; | 101 | vcpu_e500->mas7 = spr_val; break; |
102 | case SPRN_L1CSR0: | ||
103 | vcpu_e500->l1csr0 = spr_val; | ||
104 | vcpu_e500->l1csr0 &= ~(L1CSR0_DCFI | L1CSR0_CLFC); | ||
105 | break; | ||
102 | case SPRN_L1CSR1: | 106 | case SPRN_L1CSR1: |
103 | vcpu_e500->l1csr1 = spr_val; break; | 107 | vcpu_e500->l1csr1 = spr_val; break; |
104 | case SPRN_HID0: | 108 | case SPRN_HID0: |
@@ -179,6 +183,8 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) | |||
179 | break; | 183 | break; |
180 | } | 184 | } |
181 | 185 | ||
186 | case SPRN_L1CSR0: | ||
187 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->l1csr0); break; | ||
182 | case SPRN_L1CSR1: | 188 | case SPRN_L1CSR1: |
183 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->l1csr1); break; | 189 | kvmppc_set_gpr(vcpu, rt, vcpu_e500->l1csr1); break; |
184 | case SPRN_HID0: | 190 | case SPRN_HID0: |