Jan Beulich
2012-Oct-18 07:45 UTC
[PATCH] ACPI/APEI: accept validly sized ERST on Intel systems only for now
Various AMD systems (but [unfortunately] not mine) hang when the table size check passes. Allow the check to pass on Intel systems only for now (until someone can actually debug the problem). Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/drivers/acpi/apei/erst.c +++ b/xen/drivers/acpi/apei/erst.c @@ -769,6 +769,19 @@ static int __init erst_check_table(struc switch (erst_tab->header_length) { case sizeof(*erst_tab) - sizeof(erst_tab->header): +#ifdef CONFIG_X86 + /* XXX + * While the rest of the ERST code appears to work on Intel + * systems with properly sized tables, various AMD systems + * appear to get hung (at boot time) by allowing this. Until + * someone with access to suitable hardware can debug this, + * disable the rest of the code by considering this case + * invalid. + */ + if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) + return -EINVAL; + /* fall through */ +#endif /* * While invalid per specification, there are (early?) systems * indicating the full header size here, so accept that value too. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Keir Fraser
2012-Oct-18 07:55 UTC
Re: [PATCH] ACPI/APEI: accept validly sized ERST on Intel systems only for now
On 18/10/2012 08:45, "Jan Beulich" <JBeulich@suse.com> wrote:> Various AMD systems (but [unfortunately] not mine) hang when the table > size check passes. Allow the check to pass on Intel systems only for > now (until someone can actually debug the problem). > > Signed-off-by: Jan Beulich <jbeulich@suse.com>Acked-by: Keir Fraser <keir@xen.org>> --- a/xen/drivers/acpi/apei/erst.c > +++ b/xen/drivers/acpi/apei/erst.c > @@ -769,6 +769,19 @@ static int __init erst_check_table(struc > > switch (erst_tab->header_length) { > case sizeof(*erst_tab) - sizeof(erst_tab->header): > +#ifdef CONFIG_X86 > + /* XXX > + * While the rest of the ERST code appears to work on Intel > + * systems with properly sized tables, various AMD systems > + * appear to get hung (at boot time) by allowing this. Until > + * someone with access to suitable hardware can debug this, > + * disable the rest of the code by considering this case > + * invalid. > + */ > + if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) > + return -EINVAL; > + /* fall through */ > +#endif > /* > * While invalid per specification, there are (early?) systems > * indicating the full header size here, so accept that value too. > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Liu, Jinsong
2012-Oct-18 08:46 UTC
Re: [PATCH] ACPI/APEI: accept validly sized ERST on Intel systems only for now
Fine to Intel. Both old and new Intel platform work. Thanks, Jinsong Keir Fraser wrote:> On 18/10/2012 08:45, "Jan Beulich" <JBeulich@suse.com> wrote: > >> Various AMD systems (but [unfortunately] not mine) hang when the >> table size check passes. Allow the check to pass on Intel systems >> only for now (until someone can actually debug the problem). >> >> Signed-off-by: Jan Beulich <jbeulich@suse.com> > > Acked-by: Keir Fraser <keir@xen.org> > >> --- a/xen/drivers/acpi/apei/erst.c >> +++ b/xen/drivers/acpi/apei/erst.c >> @@ -769,6 +769,19 @@ static int __init erst_check_table(struc >> >> switch (erst_tab->header_length) { >> case sizeof(*erst_tab) - sizeof(erst_tab->header): >> +#ifdef CONFIG_X86 >> + /* XXX >> + * While the rest of the ERST code appears to work on Intel >> + * systems with properly sized tables, various AMD systems >> + * appear to get hung (at boot time) by allowing this. Until >> + * someone with access to suitable hardware can debug this, >> + * disable the rest of the code by considering this case + * >> invalid. + */ >> + if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) + return >> -EINVAL; + /* fall through */ >> +#endif >> /* >> * While invalid per specification, there are (early?) systems >> * indicating the full header size here, so accept that value too. >> >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xen.org >> http://lists.xen.org/xen-devel