[XEN PATCH v3 00/16] x86: make cpu virtualization support configurable

Sergiy Kibrik posted 16 patches 5 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1717410850.git.Sergiy._5FKibrik@epam.com
xen/arch/arm/ioreq.c                    |  6 -----
xen/arch/x86/Kconfig                    | 31 +++++++++++++++++++++++++
xen/arch/x86/cpu/vpmu_amd.c             |  9 +++----
xen/arch/x86/cpu/vpmu_intel.c           | 16 +++++++------
xen/arch/x86/domain.c                   |  8 +++----
xen/arch/x86/hvm/Makefile               |  4 ++--
xen/arch/x86/hvm/hvm.c                  |  6 ++---
xen/arch/x86/hvm/ioreq.c                | 23 ------------------
xen/arch/x86/hvm/nestedhvm.c            |  4 ++--
xen/arch/x86/hvm/viridian/viridian.c    |  4 ++--
xen/arch/x86/hvm/vmx/vmx.c              | 16 +++++++++++++
xen/arch/x86/include/asm/altp2m.h       | 15 +++++++-----
xen/arch/x86/include/asm/hvm/hvm.h      |  5 +++-
xen/arch/x86/include/asm/hvm/vmx/vmcs.h | 12 +++++-----
xen/arch/x86/include/asm/hvm/vmx/vmx.h  |  2 +-
xen/arch/x86/include/asm/p2m.h          | 17 +++++++++++++-
xen/arch/x86/mm/Makefile                |  5 ++--
xen/arch/x86/mm/hap/Makefile            |  2 +-
xen/arch/x86/mm/p2m-basic.c             | 13 ++++++-----
xen/arch/x86/mm/p2m-ept.c               |  2 +-
xen/arch/x86/oprofile/op_model_athlon.c |  2 +-
xen/arch/x86/traps.c                    | 13 ++++-------
xen/common/ioreq.c                      |  5 +++-
xen/include/xen/ioreq.h                 |  2 +-
24 files changed, 132 insertions(+), 90 deletions(-)
[XEN PATCH v3 00/16] x86: make cpu virtualization support configurable
Posted by Sergiy Kibrik 5 months, 3 weeks ago
This is yet another attempt to provide a means to render the cpu virtualization
technology support in Xen configurable.
Currently, irrespectively of the target platform, both AMD-V and Intel VT-x
drivers are built.
The series adds three new Kconfig controls, ALT2PM, SVM and VMX, that can be
used to switch to a finer-grained configuration for a given platform, and
reduce dead code.

The code separation is done using the new config guards.

Major changes in this series, comparing to v2, are introduction and adoption of
using_vmx & using_svm macros, and turning of arch_vcpu_ioreq_completion() into
optional callback. The latter is more rfc-style change, kind of a perspective
on how things might look.
More specific changes are provided in per-patch changelog. 

v2 series here:
https://lore.kernel.org/xen-devel/cover.1715761386.git.Sergiy_Kibrik@epam.com/

 -Sergiy

Sergiy Kibrik (9):
  x86/altp2m: check if altp2m active when giving away p2midx
  x86/p2m: guard altp2m routines
  x86: introduce CONFIG_ALTP2M Kconfig option
  x86: introduce using_{svm,vmx} macros
  x86/nestedhvm: switch to using_{svm,vmx} check
  x86/vmx: guard access to cpu_has_vmx_* in common code
  x86/vpmu: guard calls to vmx/svm functions
  ioreq: make arch_vcpu_ioreq_completion() an optional callback
  x86/vmx: replace CONFIG_HVM with CONFIG_VMX in vmx.h

Xenia Ragiadakou (7):
  x86: introduce AMD-V and Intel VT-x Kconfig options
  x86/hvm: guard AMD-V and Intel VT-x hvm_function_table initializers
  x86/p2m: guard EPT functions with using_vmx macro
  x86/traps: guard vmx specific functions with usinc_vmx macro
  x86/domain: guard svm specific functions with usinc_svm macro
  x86/oprofile: guard svm specific symbols with CONFIG_SVM
  x86/hvm: make AMD-V and Intel VT-x support configurable

 xen/arch/arm/ioreq.c                    |  6 -----
 xen/arch/x86/Kconfig                    | 31 +++++++++++++++++++++++++
 xen/arch/x86/cpu/vpmu_amd.c             |  9 +++----
 xen/arch/x86/cpu/vpmu_intel.c           | 16 +++++++------
 xen/arch/x86/domain.c                   |  8 +++----
 xen/arch/x86/hvm/Makefile               |  4 ++--
 xen/arch/x86/hvm/hvm.c                  |  6 ++---
 xen/arch/x86/hvm/ioreq.c                | 23 ------------------
 xen/arch/x86/hvm/nestedhvm.c            |  4 ++--
 xen/arch/x86/hvm/viridian/viridian.c    |  4 ++--
 xen/arch/x86/hvm/vmx/vmx.c              | 16 +++++++++++++
 xen/arch/x86/include/asm/altp2m.h       | 15 +++++++-----
 xen/arch/x86/include/asm/hvm/hvm.h      |  5 +++-
 xen/arch/x86/include/asm/hvm/vmx/vmcs.h | 12 +++++-----
 xen/arch/x86/include/asm/hvm/vmx/vmx.h  |  2 +-
 xen/arch/x86/include/asm/p2m.h          | 17 +++++++++++++-
 xen/arch/x86/mm/Makefile                |  5 ++--
 xen/arch/x86/mm/hap/Makefile            |  2 +-
 xen/arch/x86/mm/p2m-basic.c             | 13 ++++++-----
 xen/arch/x86/mm/p2m-ept.c               |  2 +-
 xen/arch/x86/oprofile/op_model_athlon.c |  2 +-
 xen/arch/x86/traps.c                    | 13 ++++-------
 xen/common/ioreq.c                      |  5 +++-
 xen/include/xen/ioreq.h                 |  2 +-
 24 files changed, 132 insertions(+), 90 deletions(-)

-- 
2.25.1