From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86: handle both NMI kinds if they occur simultaneously Date: Thu, 17 Jan 2013 11:26:14 +0000 Message-ID: <50F7DFD6.2050108@citrix.com> References: <50F7E07102000078000B6B8D@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50F7E07102000078000B6B8D@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 17/01/13 10:28, Jan Beulich wrote: > 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 I am soon to embark on some work to do with NMI buttons, and was already planning to make alterations along these lines as part of that work, so for what it is worth, Acked-by: Andrew Cooper > > --- a/xen/arch/x86/traps.c > +++ b/xen/arch/x86/traps.c > @@ -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); > } > } > > > >