]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kvm/booke_guest.c
SAM9 watchdog: update for moved headers
[linux-2.6-omap-h63xx.git] / arch / powerpc / kvm / booke_guest.c
index 9c8ad850c6e32ebcc78b697c8e8246e69d91dffa..7b2591e26bae3dc93dc7f002e833fd98de8288bb 100644 (file)
@@ -410,6 +410,21 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
                break;
        }
 
+       case BOOKE_INTERRUPT_DEBUG: {
+               u32 dbsr;
+
+               vcpu->arch.pc = mfspr(SPRN_CSRR0);
+
+               /* clear IAC events in DBSR register */
+               dbsr = mfspr(SPRN_DBSR);
+               dbsr &= DBSR_IAC1 | DBSR_IAC2 | DBSR_IAC3 | DBSR_IAC4;
+               mtspr(SPRN_DBSR, dbsr);
+
+               run->exit_reason = KVM_EXIT_DEBUG;
+               r = RESUME_HOST;
+               break;
+       }
+
        default:
                printk(KERN_EMERG "exit_nr %d\n", exit_nr);
                BUG();
@@ -471,6 +486,8 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
        vcpu->arch.msr = 0;
        vcpu->arch.gpr[1] = (16<<20) - 8; /* -8 for the callee-save LR slot */
 
+       vcpu->arch.shadow_pid = 1;
+
        /* Eye-catching number so we know if the guest takes an interrupt
         * before it's programmed its own IVPR. */
        vcpu->arch.ivpr = 0x55550000;