[PATCH 0/2] x86: Const-ify hvm_enabled and hap_enabled() when possible

Alejandro Vallejo posted 2 patches 1 month, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20260213133732.132326-1-alejandro.garciavallejo@amd.com
xen/arch/x86/Kconfig               |  2 ++
xen/arch/x86/hvm/Kconfig           |  3 +++
xen/arch/x86/hvm/hvm.c             | 17 ++++++++++++++++
xen/arch/x86/include/asm/hvm/hvm.h | 32 +++++++++++++++---------------
xen/arch/x86/mm/Makefile           |  2 +-
xen/include/xen/sched.h            |  3 +++
6 files changed, 42 insertions(+), 17 deletions(-)
[PATCH 0/2] x86: Const-ify hvm_enabled and hap_enabled() when possible
Posted by Alejandro Vallejo 1 month, 4 weeks ago
Hi,

pipeline (green): https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines/2324325987

hvm_enabled is already a constant in PV-only builds. Patch 1 makes it so it's
also a constant in HVM-only builds (with a compile-time panic if HVM support
is lacking in HW). Patch 2 makes it so HVM-only shadowless builds mandate HAP
at boot, thus const-ifying hap_enabled() too and removing that pesky shadow/
folder.

Cheers,
Alejandro

Alejandro Vallejo (2):
  x86: Make hvm_enabled a constant unless both PV and HVM are both
    compiled
  x86: Force HAP to be enabled when PV and shadow paging are compiled
    out

 xen/arch/x86/Kconfig               |  2 ++
 xen/arch/x86/hvm/Kconfig           |  3 +++
 xen/arch/x86/hvm/hvm.c             | 17 ++++++++++++++++
 xen/arch/x86/include/asm/hvm/hvm.h | 32 +++++++++++++++---------------
 xen/arch/x86/mm/Makefile           |  2 +-
 xen/include/xen/sched.h            |  3 +++
 6 files changed, 42 insertions(+), 17 deletions(-)


base-commit: 1f4f85b64d393be1aa8dc8170201f4fbfe9c7222
-- 
2.43.0