diff options
author | David Hashe <david.j.hashe@gmail.com> | 2016-08-22 11:41:05 -0400 |
---|---|---|
committer | David Hashe <david.j.hashe@gmail.com> | 2016-08-22 11:41:05 -0400 |
commit | f3ccaab1e982f4482177aefa95575f7d7dae21f7 (patch) | |
tree | 8797cdd232c0ccafa53d0601bc9da14a16f6db00 /src/mem/abstract_mem.hh | |
parent | d80a613990935dd144a5665a875f91725ee81f78 (diff) | |
download | gem5-f3ccaab1e982f4482177aefa95575f7d7dae21f7.tar.xz |
cpu, mem, sim: Change how KVM maps memory
Only map memories into the KVM guest address space that are
marked as usable by KVM. Create BackingStoreEntry class
containing flags for is_conf_reported, in_addr_map, and
kvm_map.
Diffstat (limited to 'src/mem/abstract_mem.hh')
-rw-r--r-- | src/mem/abstract_mem.hh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mem/abstract_mem.hh b/src/mem/abstract_mem.hh index 8ab28770d..31d34f051 100644 --- a/src/mem/abstract_mem.hh +++ b/src/mem/abstract_mem.hh @@ -111,10 +111,13 @@ class AbstractMemory : public MemObject uint8_t* pmemAddr; // Enable specific memories to be reported to the configuration table - bool confTableReported; + const bool confTableReported; // Should the memory appear in the global address map - bool inAddrMap; + const bool inAddrMap; + + // Should KVM map this memory for the guest + const bool kvmMap; std::list<LockedAddr> lockedAddrList; @@ -283,6 +286,14 @@ class AbstractMemory : public MemObject bool isInAddrMap() const { return inAddrMap; } /** + * When shadow memories are in use, KVM may want to make one or the other, + * but cannot map both into the guest address space. + * + * @return if this memory should be mapped into the KVM guest address space + */ + bool isKvmMap() const { return kvmMap; } + + /** * Perform an untimed memory access and update all the state * (e.g. locked addresses) and statistics accordingly. The packet * is turned into a response if required. |