xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: xen-devel <xen-devel@lists.xen.org>,
	Feng Jin <joe.jin@oracle.com>, Ethan Zhao <ethan.zhao@oracle.com>
Subject: ask a question about ERST
Date: Thu, 18 Oct 2012 16:31:59 +0800	[thread overview]
Message-ID: <507FBE7F.3010403@oracle.com> (raw)

Hi maintainer,
I found below patch reverted part of erst header size check.
This lead to mismatch with kernel upstream code and erst disabled on
some machine like X4170 M3/X3-2.
According to the ACPI spec 4.0 and 5.0, the Serialization Header Length
should be the length of Serialization Header.
After revert below patch, xen succeed with erst table init.
So could this patch be reverted now to match acpi spec and kernel upstream?

[root@zhenzhong2 xen-unstable.hg]# hg export 23760
# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1312909603 -3600
# Node ID ae10d7804168c185166277bcef3b18ffc9227b66
# Parent aca07ff1f0a59cc7ebb5ef76875229b7e99ba3ff
ACPI ERST: Revert change to erst_check_table() to be more permissive.

Permits tables that apparently Xen cannot handle (causes boot failure
on many systems).

Signed-off-by: Keir Fraser <keir@xen.org>

diff -r aca07ff1f0a5 -r ae10d7804168 xen/drivers/acpi/apei/erst.c
--- a/xen/drivers/acpi/apei/erst.c Tue Aug 09 17:48:16 2011 +0100
+++ b/xen/drivers/acpi/apei/erst.c Tue Aug 09 18:06:43 2011 +0100
@@ -715,13 +715,7 @@

static int __init erst_check_table(struct acpi_table_erst *erst_tab)
{
- /*
- * Some old BIOSes include the ACPI standard header in the ERST header
- * length; new BIOSes do not. Our check allows for both methods.
- */
- if ((erst_tab->header_length !=
- (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header)))
- && (erst_tab->header_length != sizeof(struct acpi_table_erst)))
+ if (erst_tab->header_length != sizeof(struct acpi_table_erst))
return -EINVAL;
if (erst_tab->header.length < sizeof(struct acpi_table_erst))
return -EINVAL;

             reply	other threads:[~2012-10-18  8:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  8:31 Zhenzhong Duan [this message]
2012-10-18  9:39 ` ask a question about ERST Ian Campbell
2012-10-18 12:06 ` Konrad Rzeszutek Wilk
2012-10-19  2:30   ` Zhenzhong Duan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=507FBE7F.3010403@oracle.com \
    --to=zhenzhong.duan@oracle.com \
    --cc=ethan.zhao@oracle.com \
    --cc=joe.jin@oracle.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).