Skip to content

RFC x86: Make cpu virtualization support configurable

Xenia Ragiadakou xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10x86: introduce AMD-V and Intel VT-x Kconfig optionsxen/arch/x86/Kconfig xen/arch/x86/cpu/Makefile xen/arch/x86/hvm/Makefile +3 more+15 -66 replies
2/10x86/hvm: separate AMD-V and Intel VT-x hvm_function_table initializersxen/arch/x86/include/asm/hvm/hvm.h+8 -02 replies
3/10x86/p2m: guard vmx specific ept functions with INTEL_VMXxen/arch/x86/mm/p2m.h+16 -01 reply
4/10x86/vpmu: separate AMD-V and Intel VT-x init arch_vpmu_ops initializersxen/arch/x86/include/asm/vpmu.h+9 -00 replies
5/10x86/traps: guard vmx specific functions with INTEL_VMXxen/arch/x86/traps.c+2 -21 reply
6/10x86/domain: guard svm specific functions with AMD_SVMxen/arch/x86/domain.c+2 -22 replies
7/10x86/oprofile: guard svm specific symbols with AMD_SVMxen/arch/x86/oprofile/op_model_athlon.c+1 -11 reply
8/10x86: wire cpu_has_svm/vmx_* to false when svm/vmx not enabledxen/arch/x86/include/asm/hvm/svm/svm.h xen/arch/x86/include/asm/hvm/vmx/vmcs.h xen/arch/x86/include/asm/hvm/vmx/vmx.h+70 -02 replies
9/10x86/ioreq: guard VIO_realmode_completion with INTEL_VMXxen/arch/x86/hvm/ioreq.c+2 -02 replies
10/10x86/hvm: make AMD-V and Intel VT-x support configurablexen/arch/x86/Kconfig+16 -20 replies

Reviews trailers per patch

3 of 10 patches have a Reviewed-by or Acked-by.

PatchJan Beulich
1/10
2/10
3/10
4/10
5/10A-b
6/10A-b
7/10A-b
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 00/10] x86: Make cpu virtualization support configurable

This series aims 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 two new Kconfig controls, AMD_SVM and INTEL_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.
The series is sent as an RFC to gather feedback in case the changes are in the wrong direction (I m mostly concerned about hap (ept/npt))

It depends on patch
"x86/vlapic: call vmx_vlapic_msr_changed through an hvm_function callback" (otherwise it won't compile with Intel VT-x support disabled) and on the series "Make x86 IOMMU driver support configurable" (AFAIU, the series has been reviewed but not merged yet) because Intel IOMMU depends on Intel VT-x for posted interrupts.

Xenia Ragiadakou (10):
x86: introduce AMD-V and Intel VT-x Kconfig options x86/hvm: separate AMD-V and Intel VT-x hvm_function_table initializers x86/p2m: guard vmx specific ept functions with INTEL_VMX x86/vpmu: separate AMD-V and Intel VT-x init arch_vpmu_ops
initializers
x86/traps: guard vmx specific functions with INTEL_VMX x86/domain: guard svm specific functions with AMD_SVM x86/oprofile: guard svm specific symbols with AMD_SVM
x86: wire cpu_has_svm/vmx_* to false when svm/vmx not enabled x86/ioreq: guard VIO_realmode_completion with INTEL_VMX x86/hvm: make AMD-V and Intel VT-x support configurable

 xen/arch/x86/Kconfig                    | 20 ++++++++++++++
 xen/arch/x86/cpu/Makefile               |  4 ++-
 xen/arch/x86/domain.c                   |  4 +--
 xen/arch/x86/hvm/Makefile               |  4 +--
 xen/arch/x86/hvm/ioreq.c                |  2 ++
 xen/arch/x86/include/asm/hvm/hvm.h      |  8 ++++++
 xen/arch/x86/include/asm/hvm/svm/svm.h  | 17 ++++++++++++
 xen/arch/x86/include/asm/hvm/vmx/vmcs.h | 35 +++++++++++++++++++++++++
 xen/arch/x86/include/asm/hvm/vmx/vmx.h  | 18 +++++++++++++
 xen/arch/x86/include/asm/vpmu.h         |  9 +++++++
 xen/arch/x86/mm/Makefile                |  3 ++-
 xen/arch/x86/mm/hap/Makefile            |  2 +-
 xen/arch/x86/mm/p2m.h                   | 16 +++++++++++
 xen/arch/x86/oprofile/op_model_athlon.c |  2 +-
 xen/arch/x86/traps.c                    |  4 +--
 xen/drivers/passthrough/Kconfig         |  2 +-
 16 files changed, 139 insertions(+), 11 deletions(-)
Signature · 1 line
2.37.2