On 04.01.2025 12:11, banmengtao wrote: > From: banmengtao <jiu...@outlook.com> > > When I installed Xen on Ubuntu 22.04 and rebooted into the kernel, it kept > freezing and threw an exception: "Unsupported processor. Unknown vendor 16."
That's no really an exception, though. > This patch fixes the issue where the Hygon CPU could not be recognized when > entering the Xen kernel. You mention two issues (freezing and the log message). I find it hard to believe (without better details) that both are addressed by just the change below. Please clarify. The patch title may also need adjustment, as more general NMI setup (e.g. for the watchdog) lives elsewhere. The change here is about oprofile only. > --- a/xen/arch/x86/oprofile/nmi_int.c > +++ b/xen/arch/x86/oprofile/nmi_int.c > @@ -398,6 +398,7 @@ static int __init cf_check nmi_init(void) > > switch (vendor) { > case X86_VENDOR_AMD: > + case X86_VENDOR_HYGON: > /* Needs to be at least an Athlon (or hammer in 32bit > mode) */ > > switch (family) { > @@ -435,6 +436,11 @@ static int __init cf_check nmi_init(void) > model = &op_athlon_spec; > cpu_type = "x86-64/family16h"; > break; > + case 0x18: > + model = &op_athlon_spec; > + cpu_type = "x86-64/family18h"; > + break; > + > } > break; Note how AMD Fam 17 and 19 aren't present here either. Yet Xen boots fine there. So (as mentioned above already) quite likely there's more to the problems you observe on Hygon. Finally (nit): If already you add a blank line, please add it ahead of the new case block rather than after it. Jan