]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: Kill HCRX_HOST_FLAGS
authorMarc Zyngier <maz@kernel.org>
Wed, 30 Apr 2025 10:59:16 +0000 (11:59 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 7 May 2025 07:16:44 +0000 (00:16 -0700)
HCRX_HOST_FLAGS, like most of these hardcoded setups, are not
a good match for options that can be selectively enabled or
disabled.

Nothing but the early setup is relying on it now, so kill the
macro and move the bag of bits where they belong.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250430105916.3815157-3-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/el2_setup.h
arch/arm64/include/asm/kvm_arm.h

index ebceaae3c749b84395c9c5eccf0caf874697ad11..d40e427ddad94a4ad238e036e51b3d429e1a2692 100644 (file)
@@ -52,7 +52,7 @@
        mrs     x0, id_aa64mmfr1_el1
        ubfx    x0, x0, #ID_AA64MMFR1_EL1_HCX_SHIFT, #4
        cbz     x0, .Lskip_hcrx_\@
-       mov_q   x0, HCRX_HOST_FLAGS
+       mov_q   x0, (HCRX_EL2_MSCEn | HCRX_EL2_TCR2En | HCRX_EL2_EnFPM)
 
         /* Enable GCS if supported */
        mrs_s   x1, SYS_ID_AA64PFR1_EL1
index bba4b0e930915410dcc82b68216f2ea067abc40e..e9c8a581e16f446c8bf99b50d5badb861b0b8696 100644 (file)
 #define HCR_HOST_NVHE_PROTECTED_FLAGS (HCR_HOST_NVHE_FLAGS | HCR_TSC)
 #define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H | HCR_AMO | HCR_IMO | HCR_FMO)
 
-#define HCRX_HOST_FLAGS (HCRX_EL2_MSCEn | HCRX_EL2_TCR2En | HCRX_EL2_EnFPM)
 #define MPAMHCR_HOST_FLAGS     0
 
 /* TCR_EL2 Registers bits */