]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: ppc: Add dbsr in kvm_vcpu_arch
authorHollis Blanchard <hollisb@us.ibm.com>
Sat, 3 Jan 2009 22:23:07 +0000 (16:23 -0600)
committerAvi Kivity <avi@redhat.com>
Tue, 24 Mar 2009 09:02:57 +0000 (11:02 +0200)
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>
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kvm/booke_emulate.c

index 65c4d492d722dfb8aedcfaa2fc62d4474b3273bd..50e5ce1b400aeeae5d288db94e90f000a78b9abc 100644 (file)
@@ -163,6 +163,7 @@ struct kvm_vcpu_arch {
        u32 ccr1;
        u32 dbcr0;
        u32 dbcr1;
+       u32 dbsr;
 
 #ifdef CONFIG_KVM_EXIT_TIMING
        struct kvmppc_exit_timing timing_exit;
index 8aa78f1a1f875cc702aa21fdc5a9c6adbdcbcf8e..aebc65e93f4b41782d423fad656e0ba154277f8a 100644 (file)
@@ -111,6 +111,8 @@ int kvmppc_booke_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs)
                vcpu->arch.dbcr0 = vcpu->arch.gpr[rs]; break;
        case SPRN_DBCR1:
                vcpu->arch.dbcr1 = vcpu->arch.gpr[rs]; break;
+       case SPRN_DBSR:
+               vcpu->arch.dbsr &= ~vcpu->arch.gpr[rs]; break;
        case SPRN_TSR:
                vcpu->arch.tsr &= ~vcpu->arch.gpr[rs]; break;
        case SPRN_TCR:
@@ -204,6 +206,8 @@ int kvmppc_booke_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt)
                vcpu->arch.gpr[rt] = vcpu->arch.dbcr0; break;
        case SPRN_DBCR1:
                vcpu->arch.gpr[rt] = vcpu->arch.dbcr1; break;
+       case SPRN_DBSR:
+               vcpu->arch.gpr[rt] = vcpu->arch.dbsr; break;
 
        case SPRN_IVOR0:
                vcpu->arch.gpr[rt] = vcpu->arch.ivor[BOOKE_IRQPRIO_CRITICAL];