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

Re: [Xen-devel] [PATCH 04/15] x86/cpu/mce: Add Hygon Dhyana support to the MCA infrastructure



>>> On 15.01.19 at 13:52, <puwen@xxxxxxxx> wrote:
> On 2019/1/15 0:47, Jan Beulich wrote:
>>>>> On 20.12.18 at 14:12, <puwen@xxxxxxxx> wrote:
>>> --- a/xen/arch/x86/cpu/mcheck/mce_amd.c
>>> +++ b/xen/arch/x86/cpu/mcheck/mce_amd.c
>>> @@ -162,7 +162,8 @@ mcequirk_lookup_amd_quirkdata(struct cpuinfo_x86 *c)
>>>   {
>>>       int i;
>>>   
>>> -    BUG_ON(c->x86_vendor != X86_VENDOR_AMD);
>>> +    if (c->x86_vendor != X86_VENDOR_AMD)
>>> +        return 0;
>> 
>> Please can you leave this untouched and change the single
>> caller instead? If need be down the road (but of course you'll
>> never introduce quirky behavior), we'd then add
>> mcequirk_lookup_hygon_quirkdata().
> 
> Yes, I can leave this function untouched. And change the single caller
> amd_mcheck_init():
> -    enum mcequirk_amd_flags quirkflag = mcequirk_lookup_amd_quirkdata(ci);
> +    enum mcequirk_amd_flags quirkflag = 0;
> +
> +    if (ci->x86_vendor != X86_VENDOR_HYGON)
> +        quirkflag = mcequirk_lookup_amd_quirkdata(ci);
> 
> Is the modification OK?

Yes.

> Also add mcequirk_lookup_hygon_quirkdata() is another solution, even
> though it will do nothing at the moment.

No need to introduce it until it would actually do anything.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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