]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: PPC: booke: Reinject performance monitor interrupts
authorAlexander Graf <agraf@suse.de>
Wed, 22 Feb 2012 15:26:34 +0000 (16:26 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 8 Apr 2012 09:55:28 +0000 (12:55 +0300)
When we get a performance monitor interrupt, we need to make sure that
the host receives it. So reinject it like we reinject the other host
destined interrupts.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/include/asm/hw_irq.h
arch/powerpc/kvm/booke.c

index 51010bfc792e9ea365f6d4f3b4fa34f089dd2e28..c9aac24b02e267ab9d171af7d1087863e0ef0dc8 100644 (file)
@@ -33,6 +33,7 @@
 extern void __replay_interrupt(unsigned int vector);
 
 extern void timer_interrupt(struct pt_regs *);
+extern void performance_monitor_exception(struct pt_regs *regs);
 
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
index 488936bece69d136897ffde00573073dbba3b933..8e8aa4cb5968eac71c79d0a66e40f7d3af897452 100644 (file)
@@ -634,6 +634,10 @@ static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu,
        case BOOKE_INTERRUPT_MACHINE_CHECK:
                /* FIXME */
                break;
+       case BOOKE_INTERRUPT_PERFORMANCE_MONITOR:
+               kvmppc_fill_pt_regs(&regs);
+               performance_monitor_exception(&regs);
+               break;
        }
 }