powerpc: Fix emulation of illegal instructions on PowerNV platform
[linux-2.6-block.git] / arch / powerpc / kernel / traps.c
index f18c79c324eff539a25f8a5f10d13566a68eb573..c0e5caf8ccc72c0f7624b1e7dc9c3f7ecfe4b242 100644 (file)
@@ -1165,6 +1165,16 @@ bail:
        exception_exit(prev_state);
 }
 
+/*
+ * This occurs when running in hypervisor mode on POWER6 or later
+ * and an illegal instruction is encountered.
+ */
+void __kprobes emulation_assist_interrupt(struct pt_regs *regs)
+{
+       regs->msr |= REASON_ILLEGAL;
+       program_check_exception(regs);
+}
+
 void alignment_exception(struct pt_regs *regs)
 {
        enum ctx_state prev_state = exception_enter();