arch-arm: ELIsInHost, check VHE and SecEL2
This patch modifies ELIsInHost to correctly check for VHE and Secure EL2 implementation. Change-Id: I947dddfc6761794493fef3d59b3b35754d07ed6b Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24046 Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Giacomo Travaglini
parent
251cbd34b8
commit
5698c2b52d
@@ -342,11 +342,9 @@ ELIs32(ThreadContext *tc, ExceptionLevel el)
|
||||
bool
|
||||
ELIsInHost(ThreadContext *tc, ExceptionLevel el)
|
||||
{
|
||||
if (!ArmSystem::haveVirtualization(tc)) {
|
||||
return false;
|
||||
}
|
||||
HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
|
||||
return (!isSecureBelowEL3(tc) && !ELIs32(tc, EL2) && hcr.e2h == 1 &&
|
||||
const HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
|
||||
return ((IsSecureEL2Enabled(tc) || !isSecureBelowEL3(tc)) &&
|
||||
HaveVirtHostExt(tc) && !ELIs32(tc, EL2) && hcr.e2h == 1 &&
|
||||
(el == EL2 || (el == EL0 && hcr.tge == 1)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user