arch-arm: Check VMID in secure mode as well (NS=0)
This is still trying to completely remove any artifact which implies virtualization is only supported in non-secure mode (NS=1) Change-Id: I83fed1c33cc745ecdf3c5ad60f4f356f3c58aad5 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
@@ -320,8 +320,8 @@ struct TlbEntry : public Serializable
|
||||
if (match && !lookup.ignoreAsn) {
|
||||
match = global || (lookup.asn == asid);
|
||||
}
|
||||
if (match && nstid) {
|
||||
match = isHyp || (lookup.vmid == vmid);
|
||||
if (match && useVMID(lookup.targetEL, lookup.inHost)) {
|
||||
match = lookup.vmid == vmid;
|
||||
}
|
||||
}
|
||||
return match;
|
||||
|
||||
@@ -366,6 +366,12 @@ void syncVecElemsToRegs(ThreadContext *tc);
|
||||
|
||||
bool fgtEnabled(ThreadContext *tc);
|
||||
|
||||
static inline bool
|
||||
useVMID(ExceptionLevel el, bool in_host)
|
||||
{
|
||||
return el == EL1 || (el == EL0 && !in_host);
|
||||
}
|
||||
|
||||
} // namespace ArmISA
|
||||
} // namespace gem5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user