diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-02-28 17:07:16 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-03-20 17:32:12 +0800 |
commit | 32986563546481d9ac17280cd0aadb39b87b9817 (patch) | |
tree | a3acaa4ffdd3764d92dda1973e996ca9f6a09b76 /src/arch/x86 | |
parent | 0c50a0b4fe3956f9d2e08e75d47c9cbd79bf0268 (diff) | |
download | gem5-32986563546481d9ac17280cd0aadb39b87b9817.tar.xz |
invisispec-1.0 source
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/tlb.cc | 14 | ||||
-rw-r--r-- | src/arch/x86/tlb.hh | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc index 8e83208f4..ba14d7ef3 100644 --- a/src/arch/x86/tlb.cc +++ b/src/arch/x86/tlb.cc @@ -340,6 +340,17 @@ TLB::translate(const RequestPtr &req, wrAccesses++; } if (!entry) { + if(req->isSpec()){ + // [InvisiSpec] do not perform TLB fill for + // speculative load + specMisses++; + DPRINTF(TLB, "Get a TLB miss for a speculative load " + "address %#x at pc %#x.\n", + vaddr, tc->instAddr()); + //FIXME: currently reuse the GeneralProtection fault + //instead of creating new faults + return std::make_shared<GeneralProtection>(0); + } DPRINTF(TLB, "Handling a TLB miss for " "address %#x at pc %#x.\n", vaddr, tc->instAddr()); @@ -472,6 +483,9 @@ TLB::regStats() .name(name() + ".wrMisses") .desc("TLB misses on write requests"); + specMisses + .name(name() + ".spec_tlb_misses") + .desc("TLB misses on speculative memory requests"); } void diff --git a/src/arch/x86/tlb.hh b/src/arch/x86/tlb.hh index 827ab8166..7213b8b41 100644 --- a/src/arch/x86/tlb.hh +++ b/src/arch/x86/tlb.hh @@ -105,6 +105,7 @@ namespace X86ISA Stats::Scalar wrAccesses; Stats::Scalar rdMisses; Stats::Scalar wrMisses; + Stats::Scalar specMisses; Fault translateInt(const RequestPtr &req, ThreadContext *tc); |