On 13/10/2023 7:36 pm, Roger Pau Monné wrote: > On Fri, Oct 13, 2023 at 12:23:43PM +0100, Alejandro Vallejo wrote: >>>> diff --git a/xen/arch/x86/include/asm/amd.h >>>> b/xen/arch/x86/include/asm/amd.h >>>> index d862cb7972..5a40bcc2ba 100644 >>>> --- a/xen/arch/x86/include/asm/amd.h >>>> +++ b/xen/arch/x86/include/asm/amd.h >>>> @@ -145,11 +145,12 @@ >>>> * Hygon (Fam18h) but without simple model number rules. Instead, use >>>> STIBP >>>> * as a heuristic that distinguishes the two. >>>> * >>>> - * The caller is required to perform the appropriate vendor/family checks >>>> - * first. >>>> + * The caller is required to perform the appropriate vendor check first. >>>> */ >>>> -#define is_zen1_uarch() (!boot_cpu_has(X86_FEATURE_AMD_STIBP)) >>>> -#define is_zen2_uarch() boot_cpu_has(X86_FEATURE_AMD_STIBP) >>>> +#define is_zen1_uarch() ((boot_cpu_data.x86 == 0x17 || boot_cpu_data.x86 >>>> == 0x18) && \ >>>> + !boot_cpu_has(X86_FEATURE_AMD_STIBP)) >>>> +#define is_zen2_uarch() (boot_cpu_data.x86 == 0x17 && \ >>>> + boot_cpu_has(X86_FEATURE_AMD_STIBP)) >>> What leads you to believe there aren't Hygon Zen2's ? >> The same argument that a Hygon zen2 supports STIBP. Having seen neither HW >> nor docs all that's left is divination skills :)
Hygon reported/fixed Zen2 uarch issues in Xen. Something clearly exists. ~Andrew