From: "Jan Beulich" Subject: Re: [PATCH] NMI: continue in case of PCI SERR erros Date: Fri, 25 Feb 2011 11:17:46 +0000 Message-ID: <4D679DEA0200007800033ABF@vpn.id2.novell.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> On 25.02.11 at 11:53, Stefano Stabellini wrote: > Memory parity error is only valid for IBM PC-AT, newer machines use > bit 7 (0x80) of 0x61 port for PCI SERR. While memory errors are > usually reported via MCE. >=20 > Rename the memory parity error handler to pci serr handler and > print a warning and continue instead of crashing. >=20 > Signed-off-by: Stefano Stabellini >=20 > --- >=20 > diff -r 598d1fc295b6 xen/arch/x86/traps.c > --- a/xen/arch/x86/traps.c Thu Feb 24 09:33:19 2011 +0000 > +++ b/xen/arch/x86/traps.c Fri Feb 25 10:37:47 2011 +0000 > @@ -3075,23 +3075,12 @@ static void nmi_dom0_report(unsigned int > send_guest_trap(d, 0, TRAP_nmi); > } > =20 > -static void mem_parity_error(struct cpu_user_regs *regs) > +static void pci_serr_error(struct cpu_user_regs *regs) > { > - switch ( opt_nmi[0] ) > - { > - case 'd': /* 'dom0' */ > - nmi_dom0_report(_XEN_NMIREASON_parity_error); > - case 'i': /* 'ignore' */ > - break; > - default: /* 'fatal' */ > - console_force_unlock(); > - printk("\n\nNMI - MEMORY ERROR\n"); > - fatal_trap(TRAP_nmi, regs); > - } > + console_force_unlock(); > + printk("\n\nNMI - PCI system error (SERR)\n"); Why do you remove the reporting of the event to Dom0? I'd rather see this part stay and the public headers getting adjusted in a compatible way. Jan > =20 > - outb((inb(0x61) & 0x0f) | 0x04, 0x61); /* clear-and-disable parity = check */ > - mdelay(1); > - outb((inb(0x61) & 0x0b) | 0x00, 0x61); /* enable parity check */ > + outb((inb(0x61) & 0x0f) | 0x04, 0x61); /* clear-and-disable the PCI = SERR=20 > error line. */ > } > =20 > static void io_check_error(struct cpu_user_regs *regs) > @@ -3154,7 +3143,7 @@ asmlinkage void do_nmi(struct cpu_user_r > { > reason =3D inb(0x61); > if ( reason & 0x80 ) > - mem_parity_error(regs); > + pci_serr_error(regs); > else if ( reason & 0x40 ) > io_check_error(regs); > else if ( !nmi_watchdog ) >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com=20 > http://lists.xensource.com/xen-devel=20