On 2019/1/15 0:47, Jan Beulich wrote: >>>> On 20.12.18 at 14:12, <pu...@hygon.cn> 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? Also add mcequirk_lookup_hygon_quirkdata() is another solution, even though it will do nothing at the moment. -- Regards, Pu Wen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel