mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 21:58:27 +00:00
hv: Use hv_write_hcr() for initial configuration
This might make things work if GXF is already enabled, maybe. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
f7063e6f06
commit
95aeb7bb83
1 changed files with 7 additions and 7 deletions
14
src/hv.c
14
src/hv.c
|
@ -31,13 +31,13 @@ void hv_init(void)
|
||||||
hv_pt_init();
|
hv_pt_init();
|
||||||
|
|
||||||
// Configure hypervisor defaults
|
// Configure hypervisor defaults
|
||||||
msr(HCR_EL2, HCR_API | // Allow PAuth instructions
|
hv_write_hcr(HCR_API | // Allow PAuth instructions
|
||||||
HCR_APK | // Allow PAuth key registers
|
HCR_APK | // Allow PAuth key registers
|
||||||
HCR_TEA | // Trap external aborts
|
HCR_TEA | // Trap external aborts
|
||||||
HCR_E2H | // VHE mode (forced)
|
HCR_E2H | // VHE mode (forced)
|
||||||
HCR_RW | // AArch64 guest
|
HCR_RW | // AArch64 guest
|
||||||
HCR_AMO | // Trap SError exceptions
|
HCR_AMO | // Trap SError exceptions
|
||||||
HCR_VM); // Enable stage 2 translation
|
HCR_VM); // Enable stage 2 translation
|
||||||
|
|
||||||
// No guest vectors initially
|
// No guest vectors initially
|
||||||
msr(VBAR_EL12, 0);
|
msr(VBAR_EL12, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue