arm64: Fix the has_hyp check

boot_el is now the CurrentEL.EL field value. Use the new macros to
implement the has_hyp() check.

Sponsored by:	Arm Ltd
This commit is contained in:
Andrew Turner 2024-02-21 12:38:49 +00:00
parent 353b6a5bcb
commit 58df49801d

View file

@ -212,7 +212,7 @@ has_hyp(void)
* XXX The E2H check is wrong, but it's close enough for now. Needs to
* be re-evaluated once we're running regularly in EL2.
*/
return (boot_el == 2 && (hcr_el2 & HCR_E2H) == 0);
return (boot_el == CURRENTEL_EL_EL2 && (hcr_el2 & HCR_E2H) == 0);
}
bool