quic/qbox
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
QemuInstanceDmiManager::DmiRegion Class Reference

a DMI region More...

#include <dmi-manager.h>

Inheritance diagram for QemuInstanceDmiManager::DmiRegion:
Inheritance graph
[legend]
Collaboration diagram for QemuInstanceDmiManager::DmiRegion:
Collaboration graph
[legend]

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::MemoryRegionget_mr () const
 
qemu::MemoryRegionget_mut_mr ()
 
Key get_key () const
 
Key get_end () const
 
unsigned charget_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 &region)
 

Detailed Description

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.


The documentation for this class was generated from the following file: