haveVirtualization() is not a valid check on its own:
We need to check if EL2 trapping is currently supported and this
can only happen if we are in NS state or if SecEL2 is implemented
Change-Id: Ie2312caba1ac0f186a2a3305c55a23c7705ba3fd
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28769
Tested-by: kokoro <noreply+kokoro@google.com>
}
// Check if access disabled in CPTR_EL2
- if (ArmSystem::haveVirtualization(tc) && el <= EL2) {
+ if (el <= EL2 && EL2Enabled(tc)) {
CPTR cptr_en_check = tc->readMiscReg(MISCREG_CPTR_EL2);
if (cptr_en_check.tz)
return sveAccessTrap(EL2);