All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alejandro Vallejo" <alejandro.vallejo@cloud.com>
To: "Sergiy Kibrik" <Sergiy_Kibrik@epam.com>,
	<xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Jan Beulich" <jbeulich@suse.com>
Subject: Re: [XEN PATCH v2 1/5] x86/Kconfig: introduce CENTAUR, HYGON & SHANGHAI config options
Date: Fri, 16 Aug 2024 14:16:40 +0100	[thread overview]
Message-ID: <D3HD4V65CEC4.L5Z3L6Z056H4@cloud.com> (raw)
In-Reply-To: <2a217c9602e92f92050cb4894bb9a42ee99a84ea.1723806405.git.Sergiy_Kibrik@epam.com>

On Fri Aug 16, 2024 at 12:10 PM BST, Sergiy Kibrik wrote:
> These options aim to represent what's currently supported by Xen, and later
> to allow tuning for specific platform(s) only.
>
> HYGON and SHANGHAI options depend on AMD and INTEL as there're build
> dependencies on support code for AMD and Intel CPUs respectively.
>
> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
> CC: Alejandro Vallejo <alejandro.vallejo@cloud.com>
> CC: Jan Beulich <jbeulich@suse.com>
> ---
>  xen/arch/x86/Kconfig.cpu  | 29 +++++++++++++++++++++++++++++
>  xen/arch/x86/cpu/Makefile |  6 +++---
>  xen/arch/x86/cpu/common.c |  6 ++++++
>  3 files changed, 38 insertions(+), 3 deletions(-)
>
> diff --git a/xen/arch/x86/Kconfig.cpu b/xen/arch/x86/Kconfig.cpu
> index 5fb18db1aa..ac8f41d464 100644
> --- a/xen/arch/x86/Kconfig.cpu
> +++ b/xen/arch/x86/Kconfig.cpu
> @@ -10,6 +10,25 @@ config AMD
>  	  May be turned off in builds targetting other vendors.  Otherwise,
>  	  must be enabled for Xen to work suitably on AMD platforms.
>  
> +config CENTAUR
> +	bool "Support Centaur CPUs"
> +	default y
> +	help
> +	  Detection, tunings and quirks for VIA platforms.
> +
> +	  May be turned off in builds targeting other vendors. Otherwise, must
> +          be enabled for Xen to work suitably on VIA 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 targeting other vendors. Otherwise, must
> +          be enabled for Xen to work suitably on Hygon platforms.
> +
>  config INTEL
>  	bool "Support Intel CPUs"
>  	default y
> @@ -19,4 +38,14 @@ config INTEL
>  	  May be turned off in builds targetting other vendors.  Otherwise,
>  	  must be enabled for Xen to work suitably on Intel platforms.
>  
> +config SHANGHAI
> +	bool "Support Shanghai CPUs"
> +	depends on INTEL
> +	default y
> +	help
> +	  Detection, tunings and quirks for Zhaoxin platforms.
> +
> +	  May be turned off in builds targeting other vendors. Otherwise, must
> +          be enabled for Xen to work suitably on Zhaoxin platforms.
> +
>  endmenu
> diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile
> index eafce5f204..80739d0256 100644
> --- a/xen/arch/x86/cpu/Makefile
> +++ b/xen/arch/x86/cpu/Makefile
> @@ -3,13 +3,13 @@ obj-y += microcode/
>  obj-y += mtrr/
>  
>  obj-y += amd.o
> -obj-y += centaur.o
> +obj-$(CONFIG_CENTAUR) += centaur.o
>  obj-y += common.o
> -obj-y += hygon.o
> +obj-$(CONFIG_HYGON) += hygon.o
>  obj-y += intel.o
>  obj-y += intel_cacheinfo.o
>  obj-y += mwait-idle.o
> -obj-y += shanghai.o
> +obj-$(CONFIG_SHANGHAI) += shanghai.o
>  obj-y += vpmu.o
>  obj-$(CONFIG_AMD) += vpmu_amd.o
>  obj-$(CONFIG_INTEL) += vpmu_intel.o
> diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
> index ff4cd22897..dcc2753212 100644
> --- a/xen/arch/x86/cpu/common.c
> +++ b/xen/arch/x86/cpu/common.c
> @@ -339,9 +339,15 @@ void __init early_cpu_init(bool verbose)
>  	case X86_VENDOR_INTEL:    intel_unlock_cpuid_leaves(c);
>  				  actual_cpu = intel_cpu_dev;    break;
>  	case X86_VENDOR_AMD:      actual_cpu = amd_cpu_dev;      break;
> +#ifdef CONFIG_CENTAUR
>  	case X86_VENDOR_CENTAUR:  actual_cpu = centaur_cpu_dev;  break;
> +#endif
> +#ifdef CONFIG_SHANGHAI
>  	case X86_VENDOR_SHANGHAI: actual_cpu = shanghai_cpu_dev; break;
> +#endif
> +#ifdef CONFIG_HYGON
>  	case X86_VENDOR_HYGON:    actual_cpu = hygon_cpu_dev;    break;
> +#endif
>  	default:
>  		actual_cpu = default_cpu;
>  		if (!verbose)

Reviewed-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>

Cheers,
Alejandro


  reply	other threads:[~2024-08-16 13:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1723806405.git.Sergiy_Kibrik@epam.com>
2024-08-16 11:10 ` [XEN PATCH v2 1/5] x86/Kconfig: introduce CENTAUR, HYGON & SHANGHAI config options Sergiy Kibrik
2024-08-16 13:16   ` Alejandro Vallejo [this message]
2024-08-19  8:53   ` Jan Beulich
2024-08-29  9:29     ` Sergiy Kibrik
2024-08-16 11:12 ` [XEN PATCH v2 2/5] x86/amd: configurable handling of AMD-specific MSRs access Sergiy Kibrik
2024-08-19 12:21   ` Jan Beulich
2024-08-16 11:14 ` [XEN PATCH v2 3/5] x86/spec-ctrl: configurable Intlel/AMD-specific calculations Sergiy Kibrik
2024-08-19 12:28   ` Jan Beulich
2024-08-29 19:25   ` Andrew Cooper
2024-08-30  7:41     ` Jan Beulich
2024-08-16 11:17 ` [XEN PATCH v2 4/5] x86/intel: optional build of intel.c Sergiy Kibrik
2024-08-19 12:31   ` Jan Beulich
2024-08-16 11:19 ` [XEN PATCH v2 5/5] x86/amd: optional build of amd.c Sergiy Kibrik
2024-08-19 12:36   ` Jan Beulich
2024-08-29  9:48     ` Sergiy Kibrik
2024-08-29 10:02       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D3HD4V65CEC4.L5Z3L6Z056H4@cloud.com \
    --to=alejandro.vallejo@cloud.com \
    --cc=Sergiy_Kibrik@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.