[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 6/7] xen/mce: make ASSERT's about mce_dhandler_num in mce_action() Intel only



>>> On 24.02.17 at 11:52, <haozhong.zhang@xxxxxxxxx> wrote:
> --- a/xen/arch/x86/cpu/mcheck/mce.c
> +++ b/xen/arch/x86/cpu/mcheck/mce.c
> @@ -1621,8 +1621,8 @@ static enum mce_result mce_action(const struct 
> cpu_user_regs *regs,
>          handlers = mce_uhandlers;
>      }
>  
> -    /* At least a default handler should be registerd */
> -    ASSERT(handler_num);
> +    /* At least a default handler should be registered for Intel CPU. */
> +    ASSERT(handler_num || boot_cpu_data.x86_vendor != X86_VENDOR_INTEL);
>  
>      local_mi = (struct mc_info*)mctelem_dataptr(mctc);
>      x86_mcinfo_lookup(mic, local_mi, MC_TYPE_GLOBAL);
> @@ -1656,7 +1656,8 @@ static enum mce_result mce_action(const struct 
> cpu_user_regs *regs,
>                  break;
>              }
>          }
> -        ASSERT(i != handler_num);
> +        ASSERT(i != handler_num ||
> +               boot_cpu_data.x86_vendor != X86_VENDOR_INTEL);
>      }
>  
>      return worst_result;

I think both ASSERT()s should simply be removed: The code is fine
with the conditions they check violated, and debug builds can't have
worked due to their presence on AMD at all (yet production builds
would have been fine).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.