WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] NMI: continue in case of PCI SERR erros

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] NMI: continue in case of PCI SERR erros
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Fri, 25 Feb 2011 14:32:35 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 25 Feb 2011 06:33:14 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=ltJwLGTkHWn2/z2Sm7aUoMpGJwUk5rkx6uia+WaszAQ=; b=iSK6qVgBrUnrg0cAMuALflj5b+sfzle8PftTWbX/FZ8nFxHK+ZN1uVBG6hWn4W3MnA XNLAJhLeExYJjFD05F6Kmb58KsBEYUFdTOGshI2UltyiPzozLUCGsEwJ+wGXKJGQ7FCX vs9z3rxTni9UoN3Jycj5SNP5LNGjidCT1efjI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=HukaT4oNIzB8ZfnsLsoy58DNky73gEekFm4Q0ZhtxugEtFiIjlzIaaJBhg52dZ4Xww py/kDFxYCPtismjs1b6LL/dU7ualuKz4UwVd9dLcbzjPpu384r7IKpsbBfxAsbiVsVXg X84u3ADJwpOSpkYU7L+MIehWtvePyHO9NPkpU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1102251405170.2156@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvU+NfwEa2m3o3nEUyjnfoBashOgg==
Thread-topic: [Xen-devel] [PATCH] NMI: continue in case of PCI SERR erros
User-agent: Microsoft-Entourage/12.28.0.101117
On 25/02/2011 14:08, "Stefano Stabellini" <stefano.stabellini@xxxxxxxxxxxxx>
wrote:

> On Fri, 25 Feb 2011, Jan Beulich wrote:
>>> Because it might not have anything to do with dom0: I wrote this patch
>> 
>> As you say: might.
>> 
> 
> Ok.

I already applied the original patch.

 -- Keir

> ---
> 
> 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.
> 
> Rename the memory parity error handler to pci serr handler and
> print a warning and continue instead of crashing (it is common to
> receive PCI SERR errors for performing operations on a device in the
> wrong power state).
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> 
> 
> 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 14:04:08 2011 +0000
> @@ -3075,23 +3075,13 @@ static void nmi_dom0_report(unsigned int
>      send_guest_trap(d, 0, TRAP_nmi);
>  }
>  
> -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);
> -    }
> +    nmi_dom0_report(_XEN_NMIREASON_pci_serr_error);
> +    console_force_unlock();
> +    printk("\n\nNMI - PCI system error (SERR)\n");
>  
> -    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
> error line. */
>  }
>  
>  static void io_check_error(struct cpu_user_regs *regs)
> @@ -3154,7 +3144,7 @@ asmlinkage void do_nmi(struct cpu_user_r
>      {
>          reason = 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 )
> diff -r 598d1fc295b6 xen/include/public/nmi.h
> --- a/xen/include/public/nmi.h Thu Feb 24 09:33:19 2011 +0000
> +++ b/xen/include/public/nmi.h Fri Feb 25 14:04:08 2011 +0000
> @@ -39,6 +39,9 @@
>   /* Parity error reported via ISA port 0x61, bit 7. */
>  #define _XEN_NMIREASON_parity_error 1
>  #define XEN_NMIREASON_parity_error  (1UL << _XEN_NMIREASON_parity_error)
> + /* PCI SERR error reported via ISA port 0x61, bit 7. */
> +#define _XEN_NMIREASON_pci_serr_error 1
> +#define XEN_NMIREASON_pci_serr_error (1UL << _XEN_NMIREASON_pci_serr_error)
>   /* Unknown hardware-generated NMI. */
>  #define _XEN_NMIREASON_unknown      2
>  #define XEN_NMIREASON_unknown       (1UL << _XEN_NMIREASON_unknown)
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel