[PATCH 09/18] arm64: Prevent HVO if the HVO system feature is not enabled

From: James Houghton

Date: Tue Jul 07 2026 - 23:12:14 EST


The HVO system feature checks that all CPUs support HW AF and
BBML2_NOABORT, both of which are needed for HVO (as of this patch).

Signed-off-by: James Houghton <jthoughton@xxxxxxxxxx>
---
arch/arm64/include/asm/hugetlb.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/arm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h
index d038ff14d16c..73af7911fd83 100644
--- a/arch/arm64/include/asm/hugetlb.h
+++ b/arch/arm64/include/asm/hugetlb.h
@@ -11,6 +11,7 @@
#define __ASM_HUGETLB_H

#include <asm/cacheflush.h>
+#include <asm/cpufeature.h>
#include <asm/mte.h>
#include <asm/page.h>

@@ -65,6 +66,12 @@ extern void huge_ptep_modify_prot_commit(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep,
pte_t old_pte, pte_t new_pte);

+#define __HAVE_ARCH_HVO_SUPPORTED
+static inline bool arch_hugetlb_vmemmap_optimization_supported(void)
+{
+ return system_supports_hvo();
+}
+
#include <asm-generic/hugetlb.h>

static inline void __flush_hugetlb_tlb_range(struct vm_area_struct *vma,
--
2.55.0.795.g602f6c329a-goog