Skip to contentSkip to conversation

x86/CPU: optional build of Intel/AMD CPUs support

PATCH Superseded Sergiy Kibrik 1 participant 1 message Aug 16, 2024

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover x86/CPU: optional build of Intel/AMD CPUs support

This series is one more step towards separation of Intel/AMD support in Xen. With all preparation work is mostly done now, it becomes possible to make build of arch/x86/cpu/{amd.c,intel.c} files optional, depending on whether CONFIG_{AMD,INTEL} are enabled or not.

This can be useful for builds tuned for specific platform -- by reducing dead code that won't ever be executed on that platform anyway.

Note: this series (namely its Intel part) depends on optional PSR support patch:
https://lore.kernel.org/xen-devel/[email protected]/

v1 series' discussion here:
https://lore.kernel.org/xen-devel/[email protected]/

Changelogs are provided per-patch.

-Sergiy

Sergiy Kibrik (5):
x86/Kconfig: introduce CENTAUR, HYGON & SHANGHAI config options x86/amd: configurable handling of AMD-specific MSRs access x86/spec-ctrl: configurable Intlel/AMD-specific calculations x86/intel: optional build of intel.c
x86/amd: optional build of amd.c

 xen/arch/x86/Kconfig.cpu             | 29 ++++++++++++++++++++++++++++
 xen/arch/x86/cpu/Makefile            | 12 ++++++------
 xen/arch/x86/cpu/common.c            | 12 +++++++++++-
 xen/arch/x86/hvm/svm/svm.c           |  6 ++++--
 xen/arch/x86/include/asm/amd.h       | 23 +++++++++++++++++++---
 xen/arch/x86/include/asm/processor.h |  3 ++-
 xen/arch/x86/msr.c                   |  4 ++++
 xen/arch/x86/spec_ctrl.c             | 19 ++++++++++++++----
 8 files changed, 91 insertions(+), 17 deletions(-)
Signature · 1 line
2.25.1