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

[Xen-devel] RE: [PATCH] Fix xen hang on intel westmere-EP

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] Fix xen hang on intel westmere-EP
From: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>
Date: Wed, 24 Aug 2011 10:16:20 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, KeirFraser <keir@xxxxxxx>
Delivery-date: Tue, 23 Aug 2011 19:17:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E537A920200007800052B37@xxxxxxxxxxxxxxxxxxxx>
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>
References: <749B9D3DBF0F054390025D9EAFF47F2212D123FC5C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4E528198020000780005291D@xxxxxxxxxxxxxxxxxxxx> <749B9D3DBF0F054390025D9EAFF47F2212D123FF52@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4E537A920200007800052B37@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxhavXiP7G7AZw5TqarUNY3mmcxjwAlo3+g
Thread-topic: [PATCH] Fix xen hang on intel westmere-EP
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxxxx]
> Sent: Tuesday, August 23, 2011 4:02 PM
> >> Also, are you certain this problem exists only with this single ICH 
> >> variant?
> > So far, we only observed it on ICH10 based chipset. Did you see
> > another platform have the problems?
> 
> No, I haven't observed it on other platforms but
> - the problematic bits exist in earlier ICH versions too, and
> - there are ICH10 based systems that aren't showing any such bad
>   behavior.

It depends on the BIOS. Some already disable the legacy USB emulation and 
obviously you cannot see this problem on those platforms.

> 
> The keys I'm currently using (successfully tested on customer's and my 
> affected
> machines) are BIOS and board vendor being "Intel". Only on those I'm then
> looking for the ICH10 (and then all known variants). See below for the patch
> (still containing some debugging bits).
> 
> > Actually, the best way to solve it is to enable the ACPI mode in Xen
> > instead of in dom0. For enable ACPI, we need to write the value from
> > FADT.ACPI_ENABLE to SMI_CMD. After writing the value, the SMI
> > ownership will be disable by ACPI hardware and it also will disable some 
> > logic
> which is able to cause SMI.
> > For example, the legacy USB circuit will be masked too. Because at
> > this point, there have no need to use legacy usb emulation. This is
> > also what linux upstream did. But I think it is too complicated to
> > port this logic to xen. Anyway, if you have interesting, you can add
> > this logic to xen and there have no need for this patch again.
> 
> Was this a pretty recent change in Linux? Otherwise, how do you explain that,
> with apparently lower probability, I'm observing the very same hang with 
> native
> Linux? My assumption is that ACPI mode enabling is happening just too late for
> masking this problem.

Our bios team and me also had a try with native linux. But we cannot reproduce 
it. So this maybe another potential issue which different from what we are 
discussing now.


> --- a/xen/arch/x86/dmi_scan.c
> +++ b/xen/arch/x86/dmi_scan.c
> @@ -10,6 +10,8 @@
>  #include <asm/system.h>
>  #include <xen/dmi.h>
>  #include <xen/efi.h>
> +#include <xen/pci.h>
> +#include <xen/pci_regs.h>
> 
>  #define bt_ioremap(b,l)  ((void *)__acpi_map_table(b,l))  #define
> bt_iounmap(b,l)  ((void)0) @@ -278,6 +280,31 @@ static __init int
> broken_toshiba_keyboar
>       return 0;
>  }
> 
> +static int __init ich10_bios_quirk(struct dmi_system_id *d) {
> +    u32 port, smictl;
> +
> +    if ( pci_conf_read16(0, 0x1f, 0, PCI_VENDOR_ID) != 0x8086 )
> +        return 0;
> +
> +    switch ( pci_conf_read16(0, 0x1f, 0, PCI_DEVICE_ID) ) {
> +    case 0x3a14:
> +    case 0x3a16:
> +    case 0x3a18:
> +    case 0x3a1a:
> +printk("ACPI base=%04x\n", port = pci_conf_read16(0, 0x1f, 0, 0x40));//temp
> +        port = (port & 0xff80) + 0x30;
> +        smictl = inl(port);
> +printk("smictl=%08x\n", smictl);//temp
> +        /* turn off LEGACY_USB{,2}_EN if enabled */
> +        if ( smictl & 0x20008 )
> +            outl(smictl & ~0x20008, port); printk("smictl:%08x\n",
> +inl(port));//temp
> +        break;
> +    }
> +
> +    return 0;
> +}
> 
>  #ifdef CONFIG_ACPI_SLEEP
>  static __init int reset_videomode_after_s3(struct dmi_blacklist *d) @@
> -342,6 +369,18 @@ static __initdata struct dmi_blacklist d
>                       } },
>  #endif
> 
> +     { ich10_bios_quirk, "Intel board & BIOS",
> +             /*
> +              * BIOS leaves legacy USB emulation enabled while
> +              * SMM can't properly handle it.
> +              */
> +             {
> +                     MATCH(DMI_BOARD_VENDOR, "Intel Corp"),
> +                     MATCH(DMI_BIOS_VENDOR, "Intel Corp"),
> +                     NO_MATCH, NO_MATCH
> +             }
> +     },
> +
>  #ifdef       CONFIG_ACPI_BOOT
>       /*
>        * If your system is blacklisted here, but you find that acpi=force

This patch is better. But do we really need to disable it on other ICH? If you 
do seen this issue with other ICH, then you can do it. Otherwise, there may 
cause some potential issue. Have you test your patch on those platform?


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