38#ifndef __MEM_PHYSICAL_HH__
39#define __MEM_PHYSICAL_HH__
73 bool conf_table_reported,
bool in_addr_map,
bool kvm_map,
74 int shm_fd=-1, off_t shm_offset=0)
182 bool conf_table_reported,
183 bool in_addr_map,
bool kvm_map);
192 bool mmap_using_noreserve,
193 const std::string& shared_backstore,
194 bool auto_unlink_shared_backstore);
The AddrRangeMap uses an STL map to implement an interval tree for address decoding.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Basic support for object serialization.
A single entry for the backing store.
BackingStoreEntry(AddrRange range, uint8_t *pmem, bool conf_table_reported, bool in_addr_map, bool kvm_map, int shm_fd=-1, off_t shm_offset=0)
Create a backing store entry.
bool kvmMap
Whether KVM should map this memory into the guest address space during acceleration.
uint8_t * pmem
Pointer to the host memory this range maps to.
off_t shmOffset
If this backing store is based on a shared memory, this is the offset of this backing store in the sh...
int shmFd
If this backing store is based on a shared memory, this is the fd to the shared memory.
AddrRange range
The address range covered in the guest.
bool inAddrMap
Whether this memory should appear in the global address map.
bool confTableReported
Whether this memory should be reported to the configuration table.
The physical memory encapsulates all memories in the system and provides basic functionality for acce...
std::vector< BackingStoreEntry > backingStore
AddrRangeList getConfAddrRanges() const
Get the memory ranges for all memories that are to be reported to the configuration table.
bool isMemAddr(Addr addr) const
Check if a physical address is within a range of a memory that is part of the global address map.
~PhysicalMemory()
Unmap all the backing store we have used.
const std::string name() const
Return the name for debugging and for creation of sections for checkpointing.
void unserializeStore(CheckpointIn &cp)
Unserialize a specific backing store, identified by a section.
std::vector< AbstractMemory * > memories
AddrRangeMap< AbstractMemory *, 1 > addrMap
std::vector< BackingStoreEntry > getBackingStore() const
Get the pointers to the backing store for external host access.
void createBackingStore(AddrRange range, const std::vector< AbstractMemory * > &_memories, bool conf_table_reported, bool in_addr_map, bool kvm_map)
Create the memory region providing the backing store for a given address range that corresponds to a ...
PhysicalMemory(const PhysicalMemory &)
uint64_t totalSize() const
Get the total physical memory size.
void unserialize(CheckpointIn &cp) override
Unserialize the memories in the system.
const bool mmapUsingNoReserve
PhysicalMemory & operator=(const PhysicalMemory &)
const std::string sharedBackstore
void serializeStore(CheckpointOut &cp, unsigned int store_id, AddrRange range, uint8_t *pmem) const
Serialize a specific store.
void functionalAccess(PacketPtr pkt)
Perform an untimed memory read or write without changing anything but the memory itself.
uint64_t sharedBackstoreSize
void access(PacketPtr pkt)
Perform an untimed memory access and update all the state (e.g.
void serialize(CheckpointOut &cp) const override
Serialize all the memories in the system.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Declaration of the Packet class.