xen/arm: Only set necessary flags when initializing HCR_EL2

Only {A,F,I}MO are necessary to receive interrupts until a guest vCPU is
loaded.

The rest have no effect on Xen and it is better to avoid setting them.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Julien Grall authored and Stefano Stabellini committed 2019-01-28 16:53:14 -08:00
1 parent f19a199281
commit 2a65b43eb6
1 file changed
+6 -2
+6 -2
View File
@@ -157,8 +157,12 @@ void init_traps(void)
WRITE_SYSREG((HCPTR_CP_MASK & ~(HCPTR_CP(10) | HCPTR_CP(11))) | HCPTR_TTA,
CPTR_EL2);
/* Setup hypervisor traps */
WRITE_SYSREG(get_default_hcr_flags(), HCR_EL2);
/*
* Configure HCR_EL2 with the bare minimum to run Xen until a guest
* is scheduled. {A,I,F}MO bits are set to allow EL2 receiving
* interrupts.
*/
WRITE_SYSREG(HCR_AMO | HCR_FMO | HCR_IMO, HCR_EL2);
isb();
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.