VHE: Do not expose VHE to guests

Hafnium does not support nested virtualization, so there should be no
need for guests to be able to see support for VHE. This patch masks the
feature id register appropriately.

Change-Id: Ia9ef585d450d0bcb1dfa7081fe1f9c6b19855ac5
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
diff --git a/src/arch/aarch64/hypervisor/feature_id.c b/src/arch/aarch64/hypervisor/feature_id.c
index d1c33d2..8f3c95d 100644
--- a/src/arch/aarch64/hypervisor/feature_id.c
+++ b/src/arch/aarch64/hypervisor/feature_id.c
@@ -167,6 +167,13 @@
 	vm->arch.tid3_masks.id_aa64dfr0_el1 = ~0ULL;
 	vm->arch.tid3_masks.id_aa64isar1_el1 = ~0ULL;
 
+	/*
+	 * Always mask VHE feature. No nested virualization support at this
+	 * point so there is no need to expose VHE to guests.
+	 */
+	vm->arch.tid3_masks.id_aa64mmfr1_el1 &=
+		~(ID_AA64MMFR1_EL1_VH_MASK << ID_AA64MMFR1_EL1_VH_SHIFT);
+
 	if (features & HF_FEATURE_RAS) {
 		regs->lazy.hcr_el2 |= HCR_EL2_TERR;
 		vm->arch.tid3_masks.id_aa64mmfr1_el1 &=