From: "Alejandro Vallejo" <alejandro.vallejo@cloud.com>
To: "Sergiy Kibrik" <Sergiy_Kibrik@epam.com>,
<xen-devel@lists.xenproject.org>
Cc: "Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [XEN PATCH v1 1/2] x86/intel: optional build of intel.c
Date: Fri, 09 Aug 2024 11:36:58 +0100 [thread overview]
Message-ID: <D3BBCS1WZ3FI.KYTC0BZLDUM9@cloud.com> (raw)
In-Reply-To: <25e80b9271607da56abf9d4193e4d91b3d00bd9c.1723196909.git.Sergiy_Kibrik@epam.com>
On Fri Aug 9, 2024 at 11:09 AM BST, Sergiy Kibrik wrote:
> With specific config option INTEL in place and most of the code that depends
> on intel.c now can be optionally enabled/disabled it's now possible to put
> the whole intel.c under INTEL option as well. This will allow for a Xen build
> without Intel CPU support.
>
> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
> ---
> xen/arch/x86/cpu/Makefile | 6 +++---
> xen/arch/x86/cpu/common.c | 4 +++-
> xen/arch/x86/include/asm/processor.h | 7 ++++---
> 3 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile
> index eafce5f204..020c86bda3 100644
> --- a/xen/arch/x86/cpu/Makefile
> +++ b/xen/arch/x86/cpu/Makefile
> @@ -6,10 +6,10 @@ obj-y += amd.o
> obj-y += centaur.o
> obj-y += common.o
> obj-y += hygon.o
> -obj-y += intel.o
> -obj-y += intel_cacheinfo.o
> +obj-$(CONFIG_INTEL) += intel.o
> +obj-$(CONFIG_INTEL) += intel_cacheinfo.o
> obj-y += mwait-idle.o
> -obj-y += shanghai.o
> +obj-$(CONFIG_INTEL) += shanghai.o
Why pick this one too? It's based on VIA IP, aiui.
> 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..50ce13f81c 100644
> --- a/xen/arch/x86/cpu/common.c
> +++ b/xen/arch/x86/cpu/common.c
> @@ -336,11 +336,13 @@ void __init early_cpu_init(bool verbose)
>
> c->x86_vendor = x86_cpuid_lookup_vendor(ebx, ecx, edx);
> switch (c->x86_vendor) {
> +#ifdef CONFIG_INTEL
> case X86_VENDOR_INTEL: intel_unlock_cpuid_leaves(c);
> actual_cpu = intel_cpu_dev; break;
> + case X86_VENDOR_SHANGHAI: actual_cpu = shanghai_cpu_dev; break;
> +#endif
> case X86_VENDOR_AMD: actual_cpu = amd_cpu_dev; break;
> case X86_VENDOR_CENTAUR: actual_cpu = centaur_cpu_dev; break;
> - case X86_VENDOR_SHANGHAI: actual_cpu = shanghai_cpu_dev; break;
> case X86_VENDOR_HYGON: actual_cpu = hygon_cpu_dev; break;
> default:
> actual_cpu = default_cpu;
> diff --git a/xen/arch/x86/include/asm/processor.h b/xen/arch/x86/include/asm/processor.h
> index 66463f6a6d..a88d45252b 100644
> --- a/xen/arch/x86/include/asm/processor.h
> +++ b/xen/arch/x86/include/asm/processor.h
> @@ -507,15 +507,16 @@ static inline uint8_t get_cpu_family(uint32_t raw, uint8_t *model,
> extern int8_t opt_tsx;
> extern bool rtm_disabled;
> void tsx_init(void);
> +void update_mcu_opt_ctrl(void);
> +void set_in_mcu_opt_ctrl(uint32_t mask, uint32_t val);
> #else
> #define opt_tsx 0 /* explicitly indicate TSX is off */
> #define rtm_disabled false /* RTM was not force-disabled */
> static inline void tsx_init(void) {}
> +static inline void update_mcu_opt_ctrl(void) {}
> +static inline void set_in_mcu_opt_ctrl(uint32_t mask, uint32_t val) {}
> #endif
>
> -void update_mcu_opt_ctrl(void);
> -void set_in_mcu_opt_ctrl(uint32_t mask, uint32_t val);
> -
> enum ap_boot_method {
> AP_BOOT_NORMAL,
> AP_BOOT_SKINIT,
Cheers,
Alejandro
next prev parent reply other threads:[~2024-08-09 10:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 10:07 [XEN PATCH v1 0/2] x86/CPU: optional build of Intel/AMD CPUs support Sergiy Kibrik
2024-08-09 10:09 ` [XEN PATCH v1 1/2] x86/intel: optional build of intel.c Sergiy Kibrik
2024-08-09 10:36 ` Alejandro Vallejo [this message]
2024-08-12 9:40 ` Sergiy Kibrik
2024-08-12 9:58 ` Jan Beulich
2024-08-12 12:24 ` Alejandro Vallejo
2024-08-12 14:14 ` Sergiy Kibrik
2024-08-13 7:40 ` Jan Beulich
2024-08-15 10:58 ` Sergiy Kibrik
2024-08-09 10:11 ` [XEN PATCH v1 2/2] x86/amd: optional build of amd.c Sergiy Kibrik
2024-08-13 7:50 ` Jan Beulich
2024-08-15 10:13 ` Sergiy Kibrik
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=D3BBCS1WZ3FI.KYTC0BZLDUM9@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.