On 26/11/2025 4:44 pm, Alejandro Vallejo wrote:
> diff --git a/xen/arch/x86/Kconfig.cpu b/xen/arch/x86/Kconfig.cpu
> index 5fb18db1aa..aaf70fb37b 100644
> --- a/xen/arch/x86/Kconfig.cpu
> +++ b/xen/arch/x86/Kconfig.cpu
> @@ -19,4 +19,49 @@ config INTEL
>         May be turned off in builds targetting other vendors.  Otherwise,
>         must be enabled for Xen to work suitably on Intel platforms.
>  
> +config HYGON
> +     bool "Support Hygon CPUs"
> +     depends on AMD
> +     default y
> +     help
> +       Detection, tunings and quirks for Hygon platforms.
> +
> +       May be turned off in builds targetting other vendors.  Otherwise,
> +       must be enabled for Xen to work suitably on Hygon platforms.
> +
> +
> +config CENTAUR
> +     bool "Support Centaur CPUs"
> +     depends on INTEL
> +     default y
> +     help
> +       Detection, tunings and quirks for Centaur platforms.
> +
> +       May be turned off in builds targetting other vendors.  Otherwise,
> +       must be enabled for Xen to work suitably on Centaur platforms.
> +
> +config SHANGHAI
> +     bool "Support Shanghai CPUs"
> +     depends on INTEL
> +     default y
> +     help
> +       Detection, tunings and quirks for Shanghai platforms.
> +
> +       May be turned off in builds targetting other vendors.  Otherwise,
> +       must be enabled for Xen to work suitably on Shanghai platforms.

Minor nit, but all these 3 should be select AMD/INTEL, not depends. 
It's an implementation detail that they reach sideways into AMD/INTEL to
operate.

An end user in front of menuconfig wants to see all 5 to configure. 
It's unreasonable to require them to know that they need to enable AMD
in order to be able to configure Hygon.

> diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
> index 37820a3a08..393c30227f 100644
> --- a/xen/arch/x86/cpu/common.c
> +++ b/xen/arch/x86/cpu/common.c
> @@ -118,7 +118,7 @@ static void cf_check default_init(struct cpuinfo_x86 * c)
>       __clear_bit(X86_FEATURE_SEP, c->x86_capability);
>  }
>  
> -static const struct cpu_dev __initconst_cf_clobber __used default_cpu = {
> +static const struct cpu_dev __initconst_cf_clobber default_cpu = {

To follow up on a different question, the __used came from 660f8a75013
but it does look wrong on a second look.  It might have been a leftover
from an older revision of the patch.

~Andrew

Reply via email to