|
@@ -18,6 +18,7 @@
|
|
|
#include <linux/cma.h>
|
|
|
#include <linux/bitops.h>
|
|
|
|
|
|
+#include <asm/asm-prototypes.h>
|
|
|
#include <asm/cputable.h>
|
|
|
#include <asm/kvm_ppc.h>
|
|
|
#include <asm/kvm_book3s.h>
|
|
@@ -633,7 +634,19 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr)
|
|
|
|
|
|
void kvmppc_bad_interrupt(struct pt_regs *regs)
|
|
|
{
|
|
|
- die("Bad interrupt in KVM entry/exit code", regs, SIGABRT);
|
|
|
+ /*
|
|
|
+ * 100 could happen at any time, 200 can happen due to invalid real
|
|
|
+ * address access for example (or any time due to a hardware problem).
|
|
|
+ */
|
|
|
+ if (TRAP(regs) == 0x100) {
|
|
|
+ get_paca()->in_nmi++;
|
|
|
+ system_reset_exception(regs);
|
|
|
+ get_paca()->in_nmi--;
|
|
|
+ } else if (TRAP(regs) == 0x200) {
|
|
|
+ machine_check_exception(regs);
|
|
|
+ } else {
|
|
|
+ die("Bad interrupt in KVM entry/exit code", regs, SIGABRT);
|
|
|
+ }
|
|
|
panic("Bad KVM trap");
|
|
|
}
|
|
|
|