浏览代码

KVM: PPC: booke: Reinject performance monitor interrupts

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>
Alexander Graf 13 年之前
父节点
当前提交
7cc1e8ee78
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 1 0
      arch/powerpc/include/asm/hw_irq.h
  2. 4 0
      arch/powerpc/kvm/booke.c

+ 1 - 0
arch/powerpc/include/asm/hw_irq.h

@@ -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>

+ 4 - 0
arch/powerpc/kvm/booke.c

@@ -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;
 	}
 }