]> xenbits.xensource.com Git - people/aperard/xen-arm.git/commitdiff
x86: handle both NMI kinds if they occur simultaneously
authorJan Beulich <jbeulich@suse.com>
Thu, 17 Jan 2013 12:59:51 +0000 (13:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 17 Jan 2013 12:59:51 +0000 (13:59 +0100)
We shouldn't assume PCI SERR excludes IOCHK.

Once at it, also remove the doubly redundant range restriction on
"reason" - the variable already is "unsigned char".

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/traps.c

index 7c180ea676b03760b31f9f219c26370835584a85..ab4e85e1f56efbd273eac8215a19d57c8b4409f0 100644 (file)
@@ -3201,10 +3201,10 @@ void do_nmi(struct cpu_user_regs *regs)
         reason = inb(0x61);
         if ( reason & 0x80 )
             pci_serr_error(regs);
-        else if ( reason & 0x40 )
+        if ( reason & 0x40 )
             io_check_error(regs);
-        else if ( !nmi_watchdog )
-            unknown_nmi_error(regs, (unsigned char)(reason&0xff));
+        if ( !(reason & 0xc0) && !nmi_watchdog )
+            unknown_nmi_error(regs, reason);
     }
 }