From 95aeb7bb837b80b10d9a583e386fbbc1f0576ee8 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Tue, 22 Jun 2021 01:14:53 +0900 Subject: [PATCH] hv: Use hv_write_hcr() for initial configuration This might make things work if GXF is already enabled, maybe. Signed-off-by: Hector Martin --- src/hv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hv.c b/src/hv.c index 09202d0e..dc1ae253 100644 --- a/src/hv.c +++ b/src/hv.c @@ -31,13 +31,13 @@ void hv_init(void) hv_pt_init(); // Configure hypervisor defaults - msr(HCR_EL2, HCR_API | // Allow PAuth instructions - HCR_APK | // Allow PAuth key registers - HCR_TEA | // Trap external aborts - HCR_E2H | // VHE mode (forced) - HCR_RW | // AArch64 guest - HCR_AMO | // Trap SError exceptions - HCR_VM); // Enable stage 2 translation + hv_write_hcr(HCR_API | // Allow PAuth instructions + HCR_APK | // Allow PAuth key registers + HCR_TEA | // Trap external aborts + HCR_E2H | // VHE mode (forced) + HCR_RW | // AArch64 guest + HCR_AMO | // Trap SError exceptions + HCR_VM); // Enable stage 2 translation // No guest vectors initially msr(VBAR_EL12, 0);