diff options
author | Bharat Bhushan <r65777@freescale.com> | 2012-06-20 01:56:53 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-07-11 11:39:36 -0400 |
commit | 6328e593c3df5e81ad7d18a2752ef2235391e9cc (patch) | |
tree | 601679a2c5395ce286870fe8f5aa64145c49b31f | |
parent | 5cfc2aabcb282f4554e7086c9893b386ad6ba9d4 (diff) |
booke/bookehv: Add host crit-watchdog exception support
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r-- | arch/powerpc/include/asm/hw_irq.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/booke.c | 21 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index c9aac24b02e2..2aadb47efaec 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h | |||
@@ -34,6 +34,8 @@ extern void __replay_interrupt(unsigned int vector); | |||
34 | 34 | ||
35 | extern void timer_interrupt(struct pt_regs *); | 35 | extern void timer_interrupt(struct pt_regs *); |
36 | extern void performance_monitor_exception(struct pt_regs *regs); | 36 | extern void performance_monitor_exception(struct pt_regs *regs); |
37 | extern void WatchdogException(struct pt_regs *regs); | ||
38 | extern void unknown_exception(struct pt_regs *regs); | ||
37 | 39 | ||
38 | #ifdef CONFIG_PPC64 | 40 | #ifdef CONFIG_PPC64 |
39 | #include <asm/paca.h> | 41 | #include <asm/paca.h> |
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 86681eec60b1..d25a097c852b 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -612,6 +612,12 @@ static void kvmppc_fill_pt_regs(struct pt_regs *regs) | |||
612 | regs->link = lr; | 612 | regs->link = lr; |
613 | } | 613 | } |
614 | 614 | ||
615 | /* | ||
616 | * For interrupts needed to be handled by host interrupt handlers, | ||
617 | * corresponding host handler are called from here in similar way | ||
618 | * (but not exact) as they are called from low level handler | ||
619 | * (such as from arch/powerpc/kernel/head_fsl_booke.S). | ||
620 | */ | ||
615 | static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu, | 621 | static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu, |
616 | unsigned int exit_nr) | 622 | unsigned int exit_nr) |
617 | { | 623 | { |
@@ -639,6 +645,17 @@ static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu, | |||
639 | kvmppc_fill_pt_regs(®s); | 645 | kvmppc_fill_pt_regs(®s); |
640 | performance_monitor_exception(®s); | 646 | performance_monitor_exception(®s); |
641 | break; | 647 | break; |
648 | case BOOKE_INTERRUPT_WATCHDOG: | ||
649 | kvmppc_fill_pt_regs(®s); | ||
650 | #ifdef CONFIG_BOOKE_WDT | ||
651 | WatchdogException(®s); | ||
652 | #else | ||
653 | unknown_exception(®s); | ||
654 | #endif | ||
655 | break; | ||
656 | case BOOKE_INTERRUPT_CRITICAL: | ||
657 | unknown_exception(®s); | ||
658 | break; | ||
642 | } | 659 | } |
643 | } | 660 | } |
644 | 661 | ||
@@ -683,6 +700,10 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
683 | r = RESUME_GUEST; | 700 | r = RESUME_GUEST; |
684 | break; | 701 | break; |
685 | 702 | ||
703 | case BOOKE_INTERRUPT_WATCHDOG: | ||
704 | r = RESUME_GUEST; | ||
705 | break; | ||
706 | |||
686 | case BOOKE_INTERRUPT_DOORBELL: | 707 | case BOOKE_INTERRUPT_DOORBELL: |
687 | kvmppc_account_exit(vcpu, DBELL_EXITS); | 708 | kvmppc_account_exit(vcpu, DBELL_EXITS); |
688 | r = RESUME_GUEST; | 709 | r = RESUME_GUEST; |