diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2009-01-03 17:23:07 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-03-24 05:02:57 -0400 |
commit | f7b200af8f1da748cc67993caeff3923d6014070 (patch) | |
tree | d69efd0b7361438cb065235e4426d09445b451ab /arch | |
parent | d0c7dc03442f7cbd8740d9a4e7a4e7f84bfa676d (diff) |
KVM: ppc: Add dbsr in kvm_vcpu_arch
Kernel for E500 need clear dbsr when startup.
So add dbsr register in kvm_vcpu_arch for BOOKE.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/booke_emulate.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 65c4d492d722..50e5ce1b400a 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
@@ -163,6 +163,7 @@ struct kvm_vcpu_arch { | |||
163 | u32 ccr1; | 163 | u32 ccr1; |
164 | u32 dbcr0; | 164 | u32 dbcr0; |
165 | u32 dbcr1; | 165 | u32 dbcr1; |
166 | u32 dbsr; | ||
166 | 167 | ||
167 | #ifdef CONFIG_KVM_EXIT_TIMING | 168 | #ifdef CONFIG_KVM_EXIT_TIMING |
168 | struct kvmppc_exit_timing timing_exit; | 169 | struct kvmppc_exit_timing timing_exit; |
diff --git a/arch/powerpc/kvm/booke_emulate.c b/arch/powerpc/kvm/booke_emulate.c index 8aa78f1a1f87..aebc65e93f4b 100644 --- a/arch/powerpc/kvm/booke_emulate.c +++ b/arch/powerpc/kvm/booke_emulate.c | |||
@@ -111,6 +111,8 @@ int kvmppc_booke_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs) | |||
111 | vcpu->arch.dbcr0 = vcpu->arch.gpr[rs]; break; | 111 | vcpu->arch.dbcr0 = vcpu->arch.gpr[rs]; break; |
112 | case SPRN_DBCR1: | 112 | case SPRN_DBCR1: |
113 | vcpu->arch.dbcr1 = vcpu->arch.gpr[rs]; break; | 113 | vcpu->arch.dbcr1 = vcpu->arch.gpr[rs]; break; |
114 | case SPRN_DBSR: | ||
115 | vcpu->arch.dbsr &= ~vcpu->arch.gpr[rs]; break; | ||
114 | case SPRN_TSR: | 116 | case SPRN_TSR: |
115 | vcpu->arch.tsr &= ~vcpu->arch.gpr[rs]; break; | 117 | vcpu->arch.tsr &= ~vcpu->arch.gpr[rs]; break; |
116 | case SPRN_TCR: | 118 | case SPRN_TCR: |
@@ -204,6 +206,8 @@ int kvmppc_booke_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt) | |||
204 | vcpu->arch.gpr[rt] = vcpu->arch.dbcr0; break; | 206 | vcpu->arch.gpr[rt] = vcpu->arch.dbcr0; break; |
205 | case SPRN_DBCR1: | 207 | case SPRN_DBCR1: |
206 | vcpu->arch.gpr[rt] = vcpu->arch.dbcr1; break; | 208 | vcpu->arch.gpr[rt] = vcpu->arch.dbcr1; break; |
209 | case SPRN_DBSR: | ||
210 | vcpu->arch.gpr[rt] = vcpu->arch.dbsr; break; | ||
207 | 211 | ||
208 | case SPRN_IVOR0: | 212 | case SPRN_IVOR0: |
209 | vcpu->arch.gpr[rt] = vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL]; | 213 | vcpu->arch.gpr[rt] = vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL]; |