arch-arm: Use the cached release object instead of HaveExt (#1751)

The MMU already stores a pointer to the release object, so it can query
it directly to check for PAN instead of relying on the slower HaveExt
helper

Change-Id: Ie3a186aa1d65955cff4a40871bde1ee78aa36ec0

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
Giacomo Travaglini
2024-11-03 11:18:10 +00:00
committed by GitHub
parent 2ed724b670
commit 4f74c3a949

View File

@@ -847,8 +847,8 @@ MMU::checkPAN(ThreadContext *tc, uint8_t ap, const RequestPtr &req, Mode mode,
// gem5) // gem5)
// 4) Instructions to be treated as unprivileged, unless // 4) Instructions to be treated as unprivileged, unless
// HCR_EL2.{E2H, TGE} == {1, 0} // HCR_EL2.{E2H, TGE} == {1, 0}
if (HaveExt(tc, ArmExtension::FEAT_PAN) && state.cpsr.pan && (ap & 0x1) && if (_release->has(ArmExtension::FEAT_PAN) && state.cpsr.pan &&
mode != BaseMMU::Execute) { (ap & 0x1) && mode != BaseMMU::Execute) {
if (req->isCacheMaintenance() && if (req->isCacheMaintenance() &&
!(req->getFlags() & Request::CACHE_BLOCK_ZERO)) { !(req->getFlags() & Request::CACHE_BLOCK_ZERO)) {