summaryrefslogtreecommitdiff
path: root/src/mem/multi_level_page_table.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-01-04 00:30:38 -0800
committerGabe Black <gabeblack@google.com>2018-01-17 23:02:06 +0000
commitbe5f4836188e49003be4b78b158f201820b570dc (patch)
tree83ae738da5e0b76ffa99150af9cf967b738d6cb6 /src/mem/multi_level_page_table.hh
parent096cdd508d49c9572b4464cd7c394a6f586f489d (diff)
downloadgem5-be5f4836188e49003be4b78b158f201820b570dc.tar.xz
mem: Change the multilevel page table to inherit from FuncPageTable.
KVM looks up translations using the image of the page table in the guest's memory, but we don't have to. By maintaining that image in addition to rather than instead of maintaining an abstract copy makes our lookups faster, and ironically avoids duplicate implementation. Change-Id: I9ff4cae6f7cf4027c3738b75f74eae50dde2fda1 Reviewed-on: https://gem5-review.googlesource.com/7341 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/mem/multi_level_page_table.hh')
-rw-r--r--src/mem/multi_level_page_table.hh7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mem/multi_level_page_table.hh b/src/mem/multi_level_page_table.hh
index 0e079b730..952c2b068 100644
--- a/src/mem/multi_level_page_table.hh
+++ b/src/mem/multi_level_page_table.hh
@@ -100,7 +100,7 @@ class System;
* @see MultiLevelPageTable
*/
template <class ISAOps>
-class MultiLevelPageTable : public PageTableBase
+class MultiLevelPageTable : public FuncPageTable
{
/**
* ISA specific operations
@@ -134,9 +134,8 @@ class MultiLevelPageTable : public PageTableBase
* @param allocate Specifies whether memory should be allocated while
* walking the page table
* @return PTE_addr The address of the found PTE
- * @retval true if the page table walk has succeded, false otherwhise
*/
- bool walk(Addr vaddr, bool allocate, Addr &PTE_addr);
+ void walk(Addr vaddr, bool allocate, Addr &PTE_addr);
public:
MultiLevelPageTable(const std::string &__name, uint64_t _pid,
@@ -149,8 +148,6 @@ public:
uint64_t flags = 0) override;
void remap(Addr vaddr, int64_t size, Addr new_vaddr) override;
void unmap(Addr vaddr, int64_t size) override;
- bool isUnmapped(Addr vaddr, int64_t size) override;
- bool lookup(Addr vaddr, TheISA::TlbEntry &entry) override;
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;
};