// VAEx(IS) and VALEx(IS) are the same because TLBs
// only store entries
// from the last level of translation table walks
- // @todo: handle VMID to enable Virtualization
// AArch64 TLB Invalidate by VA, EL3
case MISCREG_TLBI_VAE3_Xt:
case MISCREG_TLBI_VALE3_Xt:
return;
}
// AArch64 TLB Invalidate by ASID, EL1
- // @todo: handle VMID to enable Virtualization
case MISCREG_TLBI_ASIDE1_Xt:
{
assert64();
const bool el_match = te->checkELMatch(
tlbi_op.targetEL, tlbi_op.inHost);
if (te->valid && tlbi_op.secureLookup == !te->nstid &&
- (te->vmid == vmid || tlbi_op.secureLookup) && el_match) {
+ (te->vmid == vmid || tlbi_op.el2Enabled) && el_match) {
DPRINTF(TLB, " - %s\n", te->print());
te->valid = false;
te = &table[x];
if (te->valid && te->asid == tlbi_op.asid &&
tlbi_op.secureLookup == !te->nstid &&
- (te->vmid == vmid || tlbi_op.secureLookup) &&
+ (te->vmid == vmid || tlbi_op.el2Enabled) &&
te->checkELMatch(tlbi_op.targetEL, tlbi_op.inHost)) {
te->valid = false;
{
HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
inHost = (hcr.tge == 1 && hcr.e2h == 1);
+ el2Enabled = EL2Enabled(tc);
+
getMMUPtr(tc)->flush(*this);
// If CheckerCPU is connected, need to notify it of a flush
void
ITLBIALL::operator()(ThreadContext* tc)
{
+ el2Enabled = EL2Enabled(tc);
getMMUPtr(tc)->iflush(*this);
}
void
DTLBIALL::operator()(ThreadContext* tc)
{
+ el2Enabled = EL2Enabled(tc);
getMMUPtr(tc)->dflush(*this);
}
{
HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
inHost = (hcr.tge == 1 && hcr.e2h == 1);
+ el2Enabled = EL2Enabled(tc);
+
getMMUPtr(tc)->flush(*this);
CheckerCPU *checker = tc->getCheckerCpuPtr();
if (checker) {
void
ITLBIASID::operator()(ThreadContext* tc)
{
+ el2Enabled = EL2Enabled(tc);
getMMUPtr(tc)->iflush(*this);
}
void
DTLBIASID::operator()(ThreadContext* tc)
{
+ el2Enabled = EL2Enabled(tc);
getMMUPtr(tc)->dflush(*this);
}
{
public:
TLBIALL(ExceptionLevel _targetEL, bool _secure)
- : TLBIOp(_targetEL, _secure), inHost(false)
+ : TLBIOp(_targetEL, _secure), inHost(false), el2Enabled(false)
{}
void operator()(ThreadContext* tc) override;
}
bool inHost;
+ bool el2Enabled;
};
/** Instruction TLB Invalidate All */
{
public:
TLBIASID(ExceptionLevel _targetEL, bool _secure, uint16_t _asid)
- : TLBIOp(_targetEL, _secure), asid(_asid), inHost(false)
+ : TLBIOp(_targetEL, _secure), asid(_asid), inHost(false),
+ el2Enabled(false)
{}
void operator()(ThreadContext* tc) override;
uint16_t asid;
bool inHost;
+ bool el2Enabled;
};
/** Instruction TLB Invalidate by ASID match */