quic/qbox
|
a DMI region More...
#include <dmi-manager.h>
Public Types | |
using | Key = uintptr_t |
using | Ptr = std::shared_ptr< DmiRegion > |
Public Member Functions | |
DmiRegion (const tlm::tlm_dmi &info, int priority, qemu::LibQemu &inst, int fd=-1) | |
uint64_t | get_size () const |
const qemu::MemoryRegion & | get_mr () const |
qemu::MemoryRegion & | get_mut_mr () |
Key | get_key () const |
Key | get_end () const |
unsigned char * | get_ptr () const |
Static Public Member Functions | |
static Key | key_from_tlm_dmi (const tlm::tlm_dmi &info) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const DmiRegion ®ion) |
a DMI region
@detail Represent a DMI region with a size and an host pointer. It also embeds the QEMU memory region mapping to this host pointer. Note that it does not have start and end addresses as it is totally address space agnostic. Two initiators with two different views of the address space can map the same DMI region.
Note: The get_key method is used to index the map in which the regions are stored. Currently, we use the host memory address itself to index the map. This makes a strong assumption on the fact that two consecutive DMI region requests for the same region will return the same host address. This is not clearly stated in the TLM-2.0 standard but is quite reasonable to assume.