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] [PATCH] Add support for old and new bios erst, enable mce_ap

To: Keir Fraser <keir.xen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Add support for old and new bios erst, enable mce_apei logic
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Fri, 22 Jul 2011 15:08:54 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Delivery-date: Fri, 22 Jul 2011 00:10:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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: AcxIPjfC4OWjpC0ZRI2o6Qdpj7LkTQ==
Thread-topic: [PATCH] Add support for old and new bios erst, enable mce_apei logic
Add support for old and new bios erst, enable mce_apei logic

When testing, we found different bios has different understanding about APEI 
ERST table header, depending on whether it count ACPI standard header or not.
This patch add support for both bios version, and enable mce_apei.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>

diff -r fbb448cf5cba xen/arch/x86/cpu/mcheck/Makefile
--- a/xen/arch/x86/cpu/mcheck/Makefile  Thu Jul 14 13:24:19 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/Makefile  Mon Jul 18 21:40:28 2011 +0800
@@ -4,7 +4,7 @@ obj-y += amd_f10.o
 obj-y += amd_f10.o
 obj-y += mctelem.o
 obj-y += mce.o
-#obj-y += mce-apei.o
+obj-y += mce-apei.o
 obj-y += mce_intel.o
 obj-y += mce_amd_quirks.o
 obj-y += non-fatal.o
diff -r fbb448cf5cba xen/drivers/acpi/apei/erst.c
--- a/xen/drivers/acpi/apei/erst.c      Thu Jul 14 13:24:19 2011 +0100
+++ b/xen/drivers/acpi/apei/erst.c      Mon Jul 18 21:40:28 2011 +0800
@@ -715,7 +715,14 @@ int erst_clear(u64 record_id)
 
 static int __init erst_check_table(struct acpi_table_erst *erst_tab)
 {
-       if (erst_tab->header_length != sizeof(struct acpi_table_erst))
+       /*
+        * some old bios think erst header length include ACPI standard header,
+        * while new bios think it don't include ACPI standard header length.
+        * we update check here for both bios
+        */
+       if ((erst_tab->header_length !=
+           (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header)))
+           && (erst_tab->header_length != sizeof(struct acpi_table_erst)))
                return -EINVAL;
        if (erst_tab->header.length < sizeof(struct acpi_table_erst))
                return -EINVAL;

Attachment: mce_erst_1.patch
Description: mce_erst_1.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Add support for old and new bios erst, enable mce_apei logic, Liu, Jinsong <=