On 04.03.2026 20:53, Kevin Lampis wrote:
> struct cpuinfo_x86
>   .x86        => .family
>   .x86_vendor => .vendor
>   .x86_model  => .model
>   .x86_mask   => .stepping
> 
> No functional change.
> 
> This work is part of making Xen safe for Intel family 18/19.
> 
> Signed-off-by: Kevin Lampis <[email protected]>
> ---
> Changes since v1:
> - mcheck_init() check for family != 5 instead of 6 and 15

Imo this wants splitting off, to have its own description. In particular, 
there's
no 64-bit CPU with family 5, afaia.

> @@ -564,8 +565,7 @@ bool mce_available(const struct cpuinfo_x86 *c)
>   */
>  unsigned int mce_firstbank(struct cpuinfo_x86 *c)
>  {
> -    return c->x86 == 6 &&
> -           c->x86_vendor == X86_VENDOR_INTEL && c->x86_model < 0x1a;
> +    return c->vfm >= INTEL_PENTIUM_PRO && c->vfm < INTEL_NEHALEM_EP;
>  }

Wouldn't this better be

    return c->vendor == X86_VENDOR_INTEL && c->vfm < INTEL_NEHALEM_EP;

similar to how you have it in mce_is_broadcast()?

Independently there's the question whether this is correct, seeing that
INTEL_CORE2_DUNNINGTON > INTEL_NEHALEM_EP. But if a change was needed
for this, it would want to be a separate patch anyway.

> --- a/xen/arch/x86/cpu/mcheck/mce_intel.c
> +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c
> @@ -711,10 +711,7 @@ static bool mce_is_broadcast(struct cpuinfo_x86 *c)
>       * DisplayFamily_DisplayModel encoding of 06H_EH and above,
>       * a MCA signal is broadcast to all logical processors in the system
>       */
> -    if ( c->x86_vendor == X86_VENDOR_INTEL && c->x86 == 6 &&
> -         c->x86_model >= 0xe )
> -        return true;
> -    return false;
> +    return c->vendor == X86_VENDOR_INTEL && c->vfm >= INTEL_CORE_YONAH;
>  }

Is anything below Yonah 64-bit capable? Even Yonah itself isn't 64-bit capable
afaics, so perhaps again this check can be simplified in a preferably separate
change (possibly folded with the P5 related adjustment above)?

Jan

Reply via email to