Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: arm64: print Hyp mode

Print which of the hyp modes is being used (hVHE, nVHE).

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240209103719.3813599-1-joey.gouly@arm.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>

authored by

Joey Gouly and committed by
Oliver Upton
1f3ca702 1cd2b08f

+2 -1
+2 -1
arch/arm64/kvm/arm.c
··· 2591 2591 } else if (in_hyp_mode) { 2592 2592 kvm_info("VHE mode initialized successfully\n"); 2593 2593 } else { 2594 - kvm_info("Hyp mode initialized successfully\n"); 2594 + char mode = cpus_have_final_cap(ARM64_KVM_HVHE) ? 'h' : 'n'; 2595 + kvm_info("Hyp mode (%cVHE) initialized successfully\n", mode); 2595 2596 } 2596 2597 2597 2598 /*